Users

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.

AttributeValue
err_code401
http_err_code404

EmailNotUnique

This error is returned when there's already the same email registered or has been used before.

AttributeValue
err_code402
http_err_code400

PictureNotFound

This error is returned when the avatar picture of the user has not been found.

AttributeValue
err_code403
http_err_code404

UserInvitationMissing

This error is returned when the user invitation is missing.

AttributeValue
err_code404
http_err_code400

UserInvitationCannotBeDeleted

This error is returned when the user invitation cannot be deleted.

AttributeValue
err_code405
http_err_code500

UserTokenAlreadyUsed

This error is returned when the token for restoring the password has been used.

AttributeValue
err_code406
http_err_code401

UserTokenExpired

This error is returned when the token for restoring the password has expired.

AttributeValue
err_code407
http_err_code403

UserWrongCredentials

This error is returned when the user is using wrong credentials.

AttributeValue
err_code408
http_err_code403

ApiJWTEmptyToken

This error is returned when the JWT payload token is missing or empty.

AttributeValue
err_code409
http_err_code403

UserDeleteForbidden

This error is returned when the action is deleting a user from the system, company or group.

AttributeValue
err_code410
http_err_code403

UserCouldNotBeDeleted

This error is returned when deleting the user fails.

AttributeValue
err_code411
http_err_code500

UserCouldNotBeUpdated

This error is returned when updating the user fails.

AttributeValue
err_code412
http_err_code415