-
Notifications
You must be signed in to change notification settings - Fork 6
fix: readd lost custom errors #182
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
base: dev
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis pull request re-introduces three custom exception classes ( Class diagram for new exception typesclassDiagram
ValueError <|-- InputUriError
note for InputUriError "Added in this PR"
ValueError <|-- IPDistanceCalculationError
note for IPDistanceCalculationError "Added in this PR"
ValueError <|-- TesUriError
note for TesUriError "Added in this PR"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @Nidhi091999 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please fill out the PR description with details about the motivation for these new exceptions and reference any related issues.
- The exceptions dictionary entries should maintain consistency - TesUriError and IPDistanceCalculationError are missing HTTP status codes while other entries have them.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -94,4 +102,14 @@ class InvalidMiddleware(MiddlewareException): | |||
"message": "Middleware is invalid.", | |||
"code": "500", | |||
}, |
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.
issue: Missing error code for TesUriError and IPDistanceCalculationError exceptions
Other exceptions in the dictionary include both 'message' and 'code' fields. Consider adding appropriate error codes to maintain consistency in error handling.
493e0f4
to
b6c2e6d
Compare
Let's get to this after the repo is fixed again (broken tests) and after #184 is merged :) |
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.
Hey @Nidhi091999 - I've reviewed your changes - here's some feedback:
- Consider inheriting the new custom exceptions from a shared base exception class specific to this application for better error categorization.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Issue: #168
Summary by Sourcery
Add
InputUriError
andIPDistanceCalculationError
exceptions, and add aTesUriError
exception.New Features:
InputUriError
for signaling invalid input URIs.IPDistanceCalculationError
for when IP distance calculation fails.TesUriError
for when a TES URI cannot be parsed.Summary by Sourcery
Reintroduce and define custom error classes for specific error scenarios in the exceptions module
New Features:
Bug Fixes: