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

Problem Details for HTTP APIs (RFC 7807) #40

Open
daniel-mader opened this issue Apr 10, 2024 · 1 comment
Open

Problem Details for HTTP APIs (RFC 7807) #40

daniel-mader opened this issue Apr 10, 2024 · 1 comment
Labels
Request Request a feature

Comments

@daniel-mader
Copy link
Contributor

daniel-mader commented Apr 10, 2024

Description

Readability and conciseness of errors via the HTTP API (agent_api_rest) can be improved when following the Problem Details for HTTP APIs (RFC 7807). It introduces a "standard" way to report errors back to the caller.

Motivation

Enhanced API experience for the consumer.
We also want a more easy way to handle errors other than manually returning

return StatusCode::INTERNAL_SERVER_ERROR.into_response();

There are multiple options to explore:

  • make use of the framework's error handling
  • propagate the error (using thiserror and ?) and build a custom error handler / mapper

Requirements

  1. read and understand the scope of the RFC 7807
  2. search for a crate to make implementation easier (possibly this one)
  3. implement and test

Open Questions

No response

Are you planning to contribute this in a PR?

Yes

@daniel-mader daniel-mader added the Request Request a feature label Apr 10, 2024
@daniel-mader daniel-mader changed the title [Request] Problem Details for HTTP APIs (RFC 7807) Problem Details for HTTP APIs (RFC 7807) May 8, 2024
@nanderstabel
Copy link
Collaborator

(partially) depends on:impierce/openid4vc#78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request Request a feature
Projects
None yet
Development

No branches or pull requests

2 participants