Status Codes
There are two types of status codes:
HTTP Status Codes
Typically a non-200 HTTP status code indicates a more severe error condition. Standard meanings of the HTTP codes are used.
-
401 Unauthorized
– Unable to log in. The user cannot be authenticated due to missing or bad authentication (e.g., wrong password).
-
403 Forbidden
– The authenticated user is not authorized to perform the command. The user needs specific permission(s). Contact your administrator.
Application Specific Status Codes
The app specific codes are used to provide a more fine grained status messaging between the client and the backend. These codes are mainly derived from SmartGWT status code structure:
STATUS_FAILURE(-1),
STATUS_LOGIN_INCORRECT(-5),
STATUS_LOGIN_REQUIRED(-7),
STATUS_LOGIN_SUCCESS(-8),
STATUS_MAX_LOGIN_ATTEMPTS_EXCEEDED(-6),
STATUS_SERVER_TIMEOUT(-100),
STATUS_TRANSPORT_ERROR(-90),
STATUS_VALIDATION_ERROR(-4),
STATUS_SUCCESS(0),
STATUS_SYNTAX_FAILURE(100),
STATUS_LICENSE_FAILURE(101),
Obsolete: STATUS_PL_APPROVAL_FAILURE(102),
STATUS_PL_CREATE_FAILURE(103),
STATUS_CALCULATION_FAILURE(104),
STATUS_PA_DATALOAD_ERROR(200),
STATUS_PA_QUERY_ERROR(201),
STATUS_PA_SCHEMA_ERROR(202),
STATUS_PA_ASYNC_CONTINUATION(203);
The convention within SGWT is that codes with a number smaller than 0 are failures (although -8 is also a success code). Custom Pricefx codes are introduced too - they start at 100.