User exceptions
Astara's Connect exceptions have the following key attributes returned as a JSON object:
- err_code: an internal Astara's 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.
UserNotFound
This error is shown when a user object cannot be found because of the OID is wrong or its email.
Attribute | Value |
---|---|
err_code | 401 |
http_err_code | 404 |
EmailNotUnique
This error is returned when there's already the same email registered or has been used before.
Attribute | Value |
---|---|
err_code | 402 |
http_err_code | 400 |
PictureNotFound
This error is returned when the avatar picture of the user has not been found.
Attribute | Value |
---|---|
err_code | 403 |
http_err_code | 404 |
UserInvitationMissing
This error is returned when the user invitation is missing.
Attribute | Value |
---|---|
err_code | 404 |
http_err_code | 400 |
UserInvitationCannotBeDeleted
This error is returned when the user invitation cannot be deleted.
Attribute | Value |
---|---|
err_code | 405 |
http_err_code | 500 |
UserTokenAlreadyUsed
This error is returned when the token for restoring the password has been used.
Attribute | Value |
---|---|
err_code | 406 |
http_err_code | 401 |
UserTokenExpired
This error is returned when the token for restoring the password has expired.
Attribute | Value |
---|---|
err_code | 407 |
http_err_code | 403 |
UserWrongCredentials
This error is returned when the user is using wrong credentials.
Attribute | Value |
---|---|
err_code | 408 |
http_err_code | 403 |
ApiJWTEmptyToken
This error is returned when the JWT payload token is missing or empty.
Attribute | Value |
---|---|
err_code | 409 |
http_err_code | 403 |
UserDeleteForbidden
This error is returned when the action is deleting a user from the system, company or group.
Attribute | Value |
---|---|
err_code | 410 |
http_err_code | 403 |
UserCouldNotBeDeleted
This error is returned when deleting the user fails.
Attribute | Value |
---|---|
err_code | 411 |
http_err_code | 500 |
UserCouldNotBeUpdated
This error is returned when updating the user fails.
Attribute | Value |
---|---|
err_code | 412 |
http_err_code | 415 |