Errors¶
All errors resulting from operations with the API are represented by a SCWS.Error()
object:
- class SCWS.Error(message, code, status, customData)¶
Describes an error resulting from a request to the SCWS service.
- Error.message¶
Human-readable error message.
- Error.code¶
Error code string, suitable for checking when specific actions need to be taken depending on the cause.
Possible values are:
"CXR_NO_LICENSE_KEY"
: The software license key is invalid."MWR_SCWS_UNREACHABLE"
: The SCWS service could not be reached."MWR_SCWS_COMM_ERROR"
: The communication with the SCWS service failed."MWR_SCWS_COMM_TIMEOUT"
: The communication with the SCWS service has timed out."MWR_SCWS_BAD_PARAMS"
: Invalid input parameters."MWR_SCWS_UNKNOWN_ERROR"
: The SCWS service returned an invalid error code.
In addition, possible values for ICAO specific
Error.code
are the following:"ICAO_ERR_FILE_NOT_FOUND"
: The file does not exist."ICAO_ERR_INVALID_PARAMS"
: The given parameters are invalid."ICAO_ERR_GENERAL_ERROR"
: An unrecoverable error occurred. This may be due to an inconsistency in the smart card data."ICAO_ERR_OPERATION_NOT_PERMITTED"
: The operation is not permitted by token."ICAO_ERR_SECURITY_STATUS_NOT_SATISFIED"
: The security status for this operation is not satisfied."ICAO_ERR_CREDENTIAL_SUSPENDED"
: The given credential is suspended. Please launch procedure to resume it."ICAO_ERR_CREDENTIAL_DEACTIVATED"
: The given credential is deactivated. Please launch procedure to activate it."ICAO_ERR_CREDENTIAL_BLOCKED"
: The given credential is blocked. Please launch procedure to unblock it."ICAO_ERR_FUNCTION_FAILED"
: The operation failed for some unknown reason. Please try again."ICAO_ERR_FUNCTION_NOT_SUPPORTED"
: The operation is not supported by the token or middleware."ICAO_ERR_AUTHENTICATION_FAILED"
: The authentication failed."ICAO_ERR_VERIFY_CERTIFICATE_FAILED"
: The certificate verification failed."ICAO_ERR_TOKEN_NOT_RECOGNIZED"
: The token is not supported."ICAO_ERR_TOKEN_NOT_PRESENT"
: The token is not present.
- Error.httpStatus¶
HTTP status resulting from the request.
Note
In this API reference, each throws section of a function specifies Error.code
, not error types.