Method OnExceptionAsync
OnExceptionAsync(Exception)
Method that is called when an exception is caught in the HTTP server. This method is called regardless of whether ThrowExceptions is enabled or not.
protected virtual Task OnExceptionAsync(Exception exception)
Parameters
exception
ExceptionThe exception object.