Class HttpErrorResponseExceptionHandler
The exception handler for HttpErrorResponseException exception.
public class HttpErrorResponseExceptionHandler : ExceptionHandler<HttpErrorResponseException>, IExceptionHandler<HttpErrorResponseException>, IExceptionHandler
- Inheritance
-
HttpErrorResponseExceptionHandler
- Implements
- Inherited Members
Constructors
HttpErrorResponseExceptionHandler(ILogger)
The constructor for HttpErrorResponseExceptionHandler.
public HttpErrorResponseExceptionHandler(ILogger logger)
Parameters
loggerILoggerin instance of ILogger.
Methods
HandleException(IExecutionContext, HttpErrorResponseException)
Handles an exception for the given execution context.
public override bool HandleException(IExecutionContext executionContext, HttpErrorResponseException exception)
Parameters
executionContextIExecutionContextThe execution context, it contains the request and response context.
exceptionHttpErrorResponseExceptionThe exception to handle.
Returns
- bool
Returns a boolean value which indicates if the original exception should be rethrown. This method can also throw a new exception to replace the original exception.
HandleExceptionAsync(IExecutionContext, HttpErrorResponseException)
Handles an exception for the given execution context.
public override Task<bool> HandleExceptionAsync(IExecutionContext executionContext, HttpErrorResponseException exception)
Parameters
executionContextIExecutionContextThe execution context, it contains the request and response context.
exceptionHttpErrorResponseExceptionThe exception to handle.