-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Handle no volume found instead of error 500 #581
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #581 +/- ##
==========================================
- Coverage 94.67% 94.37% -0.30%
==========================================
Files 89 91 +2
Lines 4770 4908 +138
Branches 652 677 +25
==========================================
+ Hits 4516 4632 +116
- Misses 232 241 +9
- Partials 22 35 +13 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from a python point of view
required_tokens = compute_flow_cost(session=session, content=content) | ||
else: | ||
required_tokens = compute_cost(session=session, content=content) | ||
except RuntimeError as e: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why is a RuntimeError
error expected here ? Is that error not too generic ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where it can failed
It's in order to handle this error if volume is removed but not the program
Issue
Problem:
When a volume is not found, it's returning error 500 instead of returning a web response
Solution:
Catch runtime error and return the error as web error