TsgcWSAPIServer_WebAuthnEvents › OnWebAuthnException

OnWebAuthnException Event

Fires when an unhandled exception is raised while processing a WebAuthn request; lets the application log the error and override the HTTP response code.

Syntax

public event TsgcWebAuthnOnExceptionEventHandler OnWebAuthnException;
// delegate void TsgcWebAuthnOnExceptionEventHandler(TObject Sender, Exception E, out int aResponseCode)

Default Value

Remarks

Raised whenever a registration or authentication request fails with an unhandled exception. E is the exception instance and aResponseCode is the HTTP status code the server will return (default 500); change it to map the error to a more specific status such as 400 or 403 when appropriate. Useful for centralised logging and for translating internal errors into a stable HTTP contract.

Example

Back to Events