-
Notifications
You must be signed in to change notification settings - Fork 24
server: Introduce ErrorResponse and use it in error responses #208
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
server: Introduce ErrorResponse and use it in error responses #208
Conversation
15cd16f to
8f746a7
Compare
|
While reviewing eclipse-cdt-cloud/trace-server-protocol#126, a couple of "409" (conflict) responses came under scrutiny. Though they are error cases, the current The conclusion: To cover such cases, @bhufmann suggests:
|
Yes, I'll add an option detail field to the ErrorResponse, that can be filled accordingly. |
fccf3e5 to
16b6884
Compare
When an error is created when processing a client request, return an ErrorResponse JSON object that includes - title: short, human-readable description of the error - detail: optional, human-readable explanation of the error This standardizes the error response to common data structure. The field names and purpose are inspired by RFC 9457. For 409 errors (trace or experiment) return extended ErrorResponse containing the conflicting trace or experiment respectively. This commit also updates the swagger documentation in respect to the ErrorResponses accordingly. This commit also fixes some incorrect or missing the swagger definitions. Add description to Trace and Experiment model so that they are not overridden by the experiment/trace error description. Contributes to fix issue: eclipse-cdt-cloud/trace-server-protocol#122 Signed-off-by: Bernd Hufmann <[email protected]>
MatthewKhouzam
left a comment
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. I am approving but I am not sure it changes everywhere.
cae954f
into
eclipse-tracecompass-incubator:master
What it does
When an error is created when processing a client request, return an ErrorResponse JSON object that includes
This standardizes the error response to common data structure. The field names and purpose are inspired by RFC 9457.
For 409 errors (trace or experiment) return extended ErrorResponse containing the conflicting trace or experiment respectively.
This commit also updates the swagger documentation in respect to the ErrorResponses accordingly.
Contributes to fix issue:
eclipse-cdt-cloud/trace-server-protocol#122
How to test
Follow-ups
Update TSP specification.
Review checklist