Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
basic-python-rest-api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Prajwal Amin
basic-python-rest-api
Commits
ddef6621
Commit
ddef6621
authored
Oct 15, 2024
by
Deeksha M
Browse files
Options
Downloads
Patches
Plain Diff
Exception correction
parent
f7225022
Branches
master
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
api/examples/get_example.py
+2
-2
2 additions, 2 deletions
api/examples/get_example.py
with
2 additions
and
2 deletions
api/examples/get_example.py
+
2
−
2
View file @
ddef6621
...
...
@@ -28,10 +28,10 @@ def get_example(example_id):
})
example
.
validate
()
except
ModelConversionError
,
mce
:
except
ModelConversionError
as
mce
:
# ModelConversionError catches incorrect types
app
.
logger
.
exception
(
mce
.
messages
)
except
ModelValidationError
,
mve
:
except
ModelValidationError
as
mve
:
# ModelValidationError catches validation errors
app
.
logger
.
exception
(
mve
.
messages
)
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment