-
Notifications
You must be signed in to change notification settings - Fork 808
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
Return a 400 when requesting an invalid feature #1886
Comments
I like this. It would be good for a v4 release |
We could add a new query parameter to enable a "strict" mode which could do this, that way we would not need to increment the API version number. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
type: Feature request
What
When requesting polyfills it is currently possible to request a non-existent feature and receive a JS bundle in response, e.g.:
https://www.ft.com/__origami/service/polyfill/v3/polyfill.min.js?features=abcde
Details
I do not think this is desirable behaviour as it makes it possible for folks to incorrectly assume a feature exists or type in a feature name incorrectly without noticing. For example in this PR I referenced a different version of the docs (cc #1867) and because my page continued to work (and because my testing was rubbish) I assumed it was OK.
I think it may be beneficial to be stricter and respond with a
400: Bad Request
when an invalid feature is requested to protect fools like me from tripping themselves up.The text was updated successfully, but these errors were encountered: