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

Default error serializer content negotiation #2190

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

copalco
Copy link
Contributor

@copalco copalco commented Nov 26, 2023

Summary of Changes

We would like to use choose from available content type handlers to return error response content in a best format basing on the accept header of the request.

Related Issues

#2023

Pull Request Checklist

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

  • Applied changes to both WSGI and ASGI code paths and interfaces (where applicable).
  • Added tests for changed code.
  • Prefixed code comments with GitHub nick and an appropriate prefix.
  • Coding style is consistent with the rest of the framework.
  • Updated documentation for changed code.
    • Added docstrings for any new classes, functions, or modules.
    • Updated docstrings for any modifications to existing code.
    • Updated both WSGI and ASGI docs (where applicable).
    • Added references to new classes, functions, or modules to the relevant RST file under docs/.
    • Updated all relevant supporting documentation files under docs/.
    • A copyright notice is included at the top of any new modules (using your own name or the name of your organization).
    • Changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives.
  • Changes (and possible deprecations) have towncrier news fragments under docs/_newsfragments/, with the file name format {issue_number}.{fragment_type}.rst. (Run towncrier --draft to ensure it renders correctly.)

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

PR template inspired by the attrs project.

Copy link

codecov bot commented Nov 26, 2023

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (52db96d) 100.00% compared to head (0e4b6f8) 36.78%.

Files Patch % Lines
falcon/app_helpers.py 20.00% 12 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##            master    #2190       +/-   ##
============================================
- Coverage   100.00%   36.78%   -63.22%     
============================================
  Files           62       62               
  Lines         6871     6878        +7     
  Branches      1098     1098               
============================================
- Hits          6871     2530     -4341     
- Misses           0     4294     +4294     
- Partials         0       54       +54     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@copalco copalco force-pushed the default_error_serializer_content_negotiation branch from c38e21d to 0e4b6f8 Compare December 3, 2023 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant