Internal server error (500) when the backend fails

Description

If the Google backend returns with e.g. `TranslateException: Daily Limit Exceeded` then an MT exception (MTException: Unable to get translations from Google API) is thrown, but the user/client still receives

This was triggered directly with
GET http://localhost:8080/api/document/translate?toLocaleCode=ru
X-Auth-User: user X-Auth-Token: key Content-Type: application/json
{
"url" : "http://example.com",
"contents" : [ {
"value" : "Test",
"type" : "text/plain",
"metadata" : "dev"
} ],
"localeCode" : "en-us",
"backendId" : "GOOGLE"
}

Environment

None

Attachments

1

Activity

Show:

Former user 4 September 2018 at 05:35

I cannot work out where I was in the commit history - no build I test now shows a JSON response!

Sean Flanigan 30 August 2018 at 07:29

Which version were you testing when you got back a JSON 500 response which included the Google error message as a string?

Former user 30 August 2018 at 03:15

sorry, kinda threw this bug in while doing two other things. Will fill it out a bit.

Former user 30 August 2018 at 01:13
Edited

  • Have you got the stacktrace from the server log?

  • Did you trigger from Zanata or direct MT API?

Details

Assignee

Reporter

Priority

More fields

Created 30 August 2018 at 00:32
Updated 4 September 2018 at 05:35