Called when the SDK has encountered an error
If successful the onSucess method will be called with the current session metadata.