OnError = (error:Error) =>Promise<any> |any
Defines a callback invoked when an unexpected error occurs during execution of authentication endpoints such as sign-in, callback, sign-out, or userinfo.
This handler allows applications to log, transform, or respond to errors before the SDK applies its default error handling behavior.
| Parameter | Type | Description |
|---|---|---|
error | Error | The error thrown during endpoint execution. |
Promise<any> | any