Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NACSOS Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MCC APSIS
NACSOS
NACSOS Core
Merge requests
!41
Master
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Master
master
into
production
Overview
0
Commits
6
Pipelines
1
Changes
2
Merged
Tim Repke
requested to merge
master
into
production
1 year ago
Overview
0
Commits
6
Pipelines
1
Changes
2
Expand
0
0
Merge request reports
Viewing commit
e76d632b
Prev
Next
Show latest version
2 files
+
8
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
e76d632b
improve errors and fix import loop
· e76d632b
Tim Repke
authored
1 year ago
server/api/errors.py
+
7
−
3
Options
from
fastapi
import
status
as
http_status
class
UserPermissionError
(
Exception
):
status
=
http_status
.
HTTP_403_FORBIDDEN
class
DataNotFoundWarning
(
Warning
):
status
=
http_status
.
HTTP_204_NO_CONTENT
class
NoDataForKeyError
(
Exception
):
pass
status
=
http_status
.
HTTP_410_GONE
class
ItemNotFoundError
(
Exception
):
pass
status
=
http_status
.
HTTP_404_NOT_FOUND
class
ProjectNotFoundError
(
Exception
):
status
=
400
status
=
http_status
.
HTTP_400_BAD_REQUEST
class
UserNotFoundError
(
Exception
):
Loading