-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
chore: return proper http codes on unique constraint error #6428
Conversation
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
1 similar comment
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
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.
👍 Looks good to me! Reviewed everything up to 7421ef3 in 51 seconds
More details
- Looked at
73
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. ee/query-service/license/db.go:275
- Draft comment:
The function now returns*model.ApiError
instead oferror
, which is consistent with the use ofmodel.ApiError
for API error handling. This change improves error handling by providing more structured error responses. - Reason this comment was not posted:
Confidence changes required:10%
The error handling in theInsertLicenseV3
function has been updated to returnmodel.ApiError
instead oferror
. This change is consistent with the rest of the codebase wheremodel.ApiError
is used for API error handling. The change also includes specific handling for unique constraint violations, which is a good practice for providing more informative error responses.
2. ee/query-service/license/manager.go:466
- Draft comment:
The function now directly returns the error fromInsertLicenseV3
, which is amodel.ApiError
. This change ensures that the correct error type is propagated and is consistent with the updated error handling approach. - Reason this comment was not posted:
Confidence changes required:10%
The error handling in theActivateV3
function has been updated to directly return the error fromInsertLicenseV3
, which is now amodel.ApiError
. This change is consistent with the updated error handling approach and ensures that the correct error type is propagated.
3. pkg/query-service/app/http_handler.go:319
- Draft comment:
Avoid using inline styles. Use external stylesheets or styled components instead. This is also applicable in theliveTailLogs
function. - Reason this comment was not posted:
Comment was on unchanged code.
Workflow ID: wflow_VTf6pOBlaDuGRpTV
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
contributes to - https://github.com/SigNoz/platform-pod/issues/325 |
Summary
Related Issues / PR's
Screenshots
Affected Areas and Manually Tested Areas