Skip to content

API generic exceptions

Astara Connect exceptions have the following key attributes returned as a JSON object:

  • err_code: an internal Astara Connect code.
  • http_code: the http code.
  • msg: a simple message in English.

You can use the err_code to build an i18n solution on your front. The API returns all the errors in English, but you can use the code to translate them to your preferred language.

ApiAttributeException

This error is returned when the format of an attribute is wrong (i.e. an invalid uid).

Attribute Value
err_code 9900
http_err_code 400

ApiAttributeMissing

This error is returned when a required attribute is missing.

Attribute Value
err_code 9901
http_err_code 400

ApiForbidden

This error is returned when an action on the API is forbidden.

Attribute Value
err_code 9902
http_err_code 403

ApiEntityNotFound

This error is returned when an entity is not found. It could be valid for any object in the API.

Attribute Value
err_code 9903
http_err_code 404