Skip to content
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

Introduce generic error response schema #67

Closed
3 tasks done
bglamadrid opened this issue May 17, 2023 · 0 comments · Fixed by #86
Closed
3 tasks done

Introduce generic error response schema #67

bglamadrid opened this issue May 17, 2023 · 0 comments · Fixed by #86
Labels
breaker Backwards compatibility will be compromised enhancement To improve existing functionality

Comments

@bglamadrid
Copy link
Collaborator

bglamadrid commented May 17, 2023

When the application implementing this API is unable to fulfill any request as usual, the resulting response from said application should be formatted in an orderly manner.

For this, the following tasks should be done:

  • Create a schema named AppError and have it contain these properties
    • code: string
    • message: string
    • detailMessage: string
    • canRetry: boolean
  • Create a response schema using the former
  • Link this response in every error case; for status codes 400, 403, 404 and 500

This WILL break API compatibility, since there was no defined behavior prior to this; each application could format these responses and/or expect to be formatted differently from each other.

@bglamadrid bglamadrid added enhancement To improve existing functionality stub Don't work on this until tasks are decided labels May 17, 2023
@bglamadrid bglamadrid changed the title Introduce schemas for Error Responses Introduce generic error response schema Mar 13, 2024
@bglamadrid bglamadrid added breaker Backwards compatibility will be compromised and removed stub Don't work on this until tasks are decided labels Mar 13, 2024
@bglamadrid bglamadrid linked a pull request Jul 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaker Backwards compatibility will be compromised enhancement To improve existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant