3

I'm looking for all possible error codes of the Azure Translator Text API 3.0.

I just found one page that describes the format of an error: https://learn.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-reference#errors

The example is an errorcode: 403000 I recieved another error code and now I need all possible error codes to handle it correctly in my application.

Someone know how to figure out all the possible error codes? Best regards

3 Answers3

1

There's a table of response codes under each of the api's. e.g for Translate

https://learn.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-translate?tabs=curl

Response status codes

The following are the possible HTTP status codes that a request returns.

Status Code Description

  • 200 Success.
  • 400 One of the query parameters is missing or not valid. Correct request parameters before retrying.
  • 401 The request could not be authenticated. Check that credentials are specified and valid.
  • 403 The request is not authorized. Check the details error message. This often indicates that all free translations provided with a trial subscription have been used up.
  • 429 The caller is sending too many requests.
  • 500 An unexpected error occurred. If the error persists, report it with: date and time of the failure, request identifier from response
    header X-RequestId, and client identifier from request header
    X-ClientTraceId.
  • 503 Server temporarily unavailable. Retry the request. If the error persists, report it with: date and time of the failure, request
    identifier from response header X-RequestId, and client identifier
    from request header X-ClientTraceId.
Fai
  • 389
  • 2
  • 14
  • I didn't talk about "HTTP status codes". I'm looking for the error codes within an response message like { "error": { "code":403000, "message":"The subscription has exceeded its free quota." } } Link: https://learn.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-reference#errors – I WANT AN ELEPHANT Sep 24 '18 at 18:04
0

For each method (translate, dictionary lookup, etc) you can find the error codes in the Response Status Codes section, For example: https://learn.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-translate?tabs=curl#response-status-codes

  • I didn't talk about "HTTP status codes". I'm looking for the error codes within an response message like { "error": { "code":403000, "message":"The subscription has exceeded its free quota." } } Link: https://learn.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-reference#errors – I WANT AN ELEPHANT Sep 24 '18 at 18:04
0

Currently we do not have more granular codes documented and will take this request to do so. Thank you for your feedback.

  • Oh - I didn't expect that answer. Is the Translator-API released recently? How can I use an API without handling all possible errors? Someone there who is using this API? Is it usable in an productive and scaleable application? – I WANT AN ELEPHANT Sep 25 '18 at 17:24
  • Hi @Microsoft Translator - you have any updates for us? – I WANT AN ELEPHANT Nov 01 '18 at 22:22
  • They have documented the error codes! Link: https://learn.microsoft.com/de-de/azure/cognitive-services/translator/reference/v3-0-reference#errors – I WANT AN ELEPHANT Nov 06 '19 at 23:09