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

Add default structured error mapper #443

Closed
Kaliumhexacyanoferrat opened this issue Jan 5, 2024 · 0 comments · Fixed by #507
Closed

Add default structured error mapper #443

Kaliumhexacyanoferrat opened this issue Jan 5, 2024 · 0 comments · Fixed by #507
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@Kaliumhexacyanoferrat
Copy link
Owner

Kaliumhexacyanoferrat commented Jan 5, 2024

As a developer of a web service application, I would like my errors to be rendered as a structured message instead of HTML, so that I can handle it more cleanly in my clients.

Example

var errorHandling = ErrorHandler.Structured();
    
var api = Layout.Create()
                .AddService<...>()
                .Add(errorHandling);

Acceptance criteria

  • The functionality is implemented in the error handling module
  • The functionality accepts a Serialization instance to control supported formats
  • The handler renders public exception properties into the data structure
  • The project templates are extended to use this error handler
  • The feature is documented on the GenHTTP website
  • The feature is covered by acceptance tests
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat added enhancement New feature or request good first issue Good for newcomers labels Jan 5, 2024
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat linked a pull request Jul 1, 2024 that will close this issue
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat added this to the Version 8.7 milestone Jul 1, 2024
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat self-assigned this Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant