Table of Contents

Interface IAfterErrorHook

Namespace
Styra.Opa.OpenApi.Hooks
Assembly
Styra.Opa.dll

AfterErrorAsync is called after the SDK encounters an error, or a non-successful response. The hook can modify the response, if available, otherwise modify the error. All hooks are called sequentially. If an error is returned, it will be passed to the subsequent hook implementing IAfterErrorHook. If you want to prevent other AfterError hooks from being run, you can throw an FailEarlyException instead.

public interface IAfterErrorHook

Methods

AfterErrorAsync(AfterErrorContext, HttpResponseMessage?, Exception?)

Task<(HttpResponseMessage?, Exception?)> AfterErrorAsync(AfterErrorContext hookCtx, HttpResponseMessage? response, Exception? error)

Parameters

hookCtx AfterErrorContext
response HttpResponseMessage
error Exception

Returns

Task<(HttpResponseMessage, Exception)>