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

Raise NotAcceptable if suffix or query format is not acceptable #9593

Closed

Conversation

JourneyBean
Copy link

refs #9591

Modified the error handling in negotiation.py to raise exceptions.NotAcceptable when a renderer is not found.

@kevin-brown
Copy link
Member

I believe the reason for raising a 404 as opposed to a 406 was because that part of the code will only be triggered if URL path formatting is specified, at which point they would be requesting a non-existent endpoint as opposed to making a request with an invalid Accept* header.

Copy link

@ulgens ulgens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why it got closed but this looks like a nice catch and fix.

@tomchristie
Copy link
Member

tomchristie commented Nov 25, 2024

I think @kevin-brown made the correct call here.

(The current behaviour is intentional)

Thanks to @JourneyBean for the suggestion, tho.

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.

5 participants