on Error
Called when the operation fails.
Parameters
error Code
The error code indicating the reason for failure.
error Data
Additional information associated with the error code, whose type is specified by the generic parameter of the interface.