HTTP Operation Type Object
(Action) localizedErrorMessage

Description


The localizedErrorMessage service retrieves a localized error message based on a given error code and a mandatory language parameter, ensuring an enhanced user experience with clear and specific error information.

This service supports the following languages: French, Spanish, English, and German.
The language parameter is mandatory and must be provided in one of the following formats:

  • Short format: fr, en, es, de.
  • Full format: as returned by applicationLanguageCode in userProfile, e.g., fr-FR.

For example, if the error code is global.businessErrors.invalidSteuernumberNumber and the requested language is en, the response will be The identification number is not valid.


img

Required Parameters

To utilize this service, you must provide the following parameters:

Response

The service returns the localized error message for the specified error code and language.

Key Value
Authorization Bearer Current access Token How to find?
x-api-key Primary or secondary subscription key of your app How to find?
graphQL Query
query($errorCode: String!, $language: String!) {
  localizedErrorMessage(errorCode: $errorCode, language: $language) {
    message
  }
}
graphQL Variables
{
  "errorCode": "sales.businessErrors.codeCannotContainBlankSpaces",
  "language": "en"
}
Example Response
{
  "data": {
    "localizedErrorMessage": {
      "message": "You cannot enter a code that includes blank spaces. Enter a code that only contains letters or numbers. "
    }
  }
}

Error Handling

If errorCode or language is unsupported or invalid, the API responds with informative messages:

{
  "errors": [
    {
      "message": "Unrecognized error code 'Xaccounting.businessErrors.accountingAccountApplyVatFalseAndDatevEnabledDE'. Please check the error code and try again."
    }
  ],
  "data": null
}
{
  "errors": [
    {
      "message": "The specified language 'XF' is unsupported."
    }
  ],
  "data": null
}

localizedErrorMessage Input parameters

Fields Type Description Length
errorCode String Error code to be localized 250
language String Required language code 2 or 5
Info
  • errorCode: The specific business error code provided in the request.
  • language: The language in which the message is returned.
    This value is mandatory and must be provided in one of the following formats:
    • Short format: fr, en, es, de.
    • Full format: as returned by applicationLanguageCode in userProfile, e.g., fr-FR.

localizedErrorMessage Response

Fields Type Description
message String Localized error message
errorCode String The error code used for the message
language String Language of the returned message