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

Do not return 404 on queries for the same language pair #3210

Open
unho opened this issue May 31, 2016 · 2 comments
Open

Do not return 404 on queries for the same language pair #3210

unho opened this issue May 31, 2016 · 2 comments

Comments

@unho
Copy link
Member

unho commented May 31, 2016

This comes from translate/pootle#4759.

amaGama currently returns a 404 for queries where the source and target language are the same. See https://github.com/translate/amagama/blob/master/amagama/tmdb.py#L441-L443

It was suggested to return a different HTTP error code, but given that that might trigger error handling on Pootle perhaps it is better to instead return an empty result.

@friedelwolff
Copy link
Member

As I recall, my idea was to return something so that clients could know if a certain language pair is unsupported. This way they can (hopefully) stop asking, instead of handling the error with each request. I didn't investigate the error codes, but I guess something else might be just as useful if existing users (Pootle and Virtaal) can handle it just as well.

@unho
Copy link
Member Author

unho commented Jun 2, 2016

@friedelwolff Would old Virtaal instances be able to handle the scenario where amaGama returns a different HTTP code, or if it returns the message you suggested?

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

No branches or pull requests

2 participants