AI-generated Key Takeaways
-
The
Accept-Language
header in the request determines the language of error messages. -
Error responses may contain a localized message object with the locale and translated message.
-
The
locale
field follows the BCP 47 specification for language tags (e.g., "en-US"). -
The
message
field provides the error message translated into the specified locale.
If the Accept-Language
header in the incoming request is not "English", then errors returned by the Apps Script API include this message. It contains the same error text translated to the requested locale.
JSON representation |
---|
{ "locale": string, "message": string } |
Fields | |
---|---|
locale |
The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX" |
message |
The localized error message in the above locale. |