Closed annathecrow closed 8 years ago
We decided to resolve it (for now) by aborting with a message containing the canonical tag, so the user can re-run the request.
Note for the future: it's possible to form the "proper" API request url (e.g. with the respective canonical tag). The most logical way of handling this would be returning a 30x http status code with the proper url in "location" status header. Only, the flask abort()
function isn't meant to do that, so we would have to rebuild the class to do it's own aborting/redirection. Ooof.
In this branch, I'm trying to fix the problem with AO3 redirect-to-canonical dropping params (issue #47) (I also accidentally do #19 when catching status codes/error messages)
This is the lazy version: return 400 Bad Request, with the canonical tag in the message. Users would repeat their call with the canonical tag on their own.
The other option is to rerun the call with the canonical tag automaticaly. This brings A LOT of new issues: