# Failure

constructor(errorCode: C, errorMessage: String, details: List<ErrorDetails> = emptyList(), debugCode: String, debugMessage: String)

#### Parameters

errorCode

Error code of an unsuccessful operation. Use this error code to appropriately handle the failure.

errorMessage

Error message with the cause of failure intended for end users.

details

More detailed descriptions of the error(s) causing the failure, if available. In many cases these are the actual errors returned from a server call. It is possible for a failure to happen without more detail that provided by the other fields, and this will be an empty list in such cases. (For example, error code NOT_AUTHORIZED has no additional details, the developer simply needs to call AuthorizationManager.authorize() before using the failing Mobile Payments SDK method).

debugCode

More detailed "debug" error code for troubleshooting the failure. Intended for developers only.

debugMessage

More detailed error message containing additional debug information related to the possible cause of the failure. Intended for developers only.