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

Error Response like RFC 7807 #1445

Open
pratik-k-ev opened this issue Jan 27, 2025 · 5 comments · May be fixed by #1505
Open

Error Response like RFC 7807 #1445

pratik-k-ev opened this issue Jan 27, 2025 · 5 comments · May be fixed by #1505
Assignees
Labels
enhancement New feature or request

Comments

@pratik-k-ev
Copy link

Is your feature request related to a problem? Please describe.
I want to return response with much more detail.

Describe the solution you'd like
According to RFC 7807, can update the error response to support those fields.

Describe alternatives you've considered
Not sure, maybe error customize the error response payload.

@Umang01-hash
Copy link
Member

@pratik-k-ev can you please elaborate your issue. Want to know more about the problem you are facing and how we can help to resolve it

@pratik-k-ev
Copy link
Author

The current error response format is

{
    "error": {
        "message": "..."
    }
}

I wanted to extend error response fields and standardize according to RFC 7807.

Fields in RFC 7807

{
  "type": "string",
  "title": "string",
  "status": "integer",
  "detail": "string",
  "instance": "string",
  "extensions": {
    "field_name": "value"
  }
}

Is there way to follow this, or extend current error response fields?

@coolwednesday
Copy link
Contributor

@Umang01-hash , Please assign this issue to me .....

@Umang01-hash Umang01-hash added the enhancement New feature or request label Feb 10, 2025
@coolwednesday
Copy link
Contributor

Hey @pratik-k-ev, the error approach is proposed and I can see it has also become obsolete being replaced by RFC 9457.

We might extend support to send such errors through custom errors, however can you please let me know if this is still under proposal or has been accepted ?

Based on that, we can work on this feature for your usecase.

@pratik-k-ev
Copy link
Author

Is there a way to customise error payload fields..?

@jsxs0 jsxs0 linked a pull request Feb 19, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants