GlobalErrors

class GlobalErrors(manifest: Manifest, options: WowHttpOptions = WowHttpOptions()) : WebExceptionHandler, Ordered

The error handling of the application's own routes (review M; 9.x DefaultGlobalExceptionHandler): a failure that escapes a route the application serves beside Wow's is answered as an RFC 9457 problem of the same shape and codes as the framework routes' (Problem), never Spring's default error body:

  • a CommandRejectedException (a command an application route sent through a CommandClient) as its result, the status of its code in the Manifest's tables (ErrorStatuses) and its result as result;

  • a WowProblemException as its code, status, result, retry and Retry-After;

  • a StorageUnavailableException as 503 wow.storage.unavailable with Retry-After, a body larger than the codecs take as 413, as on the framework routes (Problem.ofFailure);

  • a ResponseStatusException (no route, a method or media type not served, a body that cannot be read) as the problem of its status alone (about:blank), its reason as the detail for a 4xx;

  • anything else as a 500 that says nothing of its cause, which is logged.

It runs before Spring Boot's error handler (order); a response already committed is left as it is. Wow's own routes answer their problems themselves, so it sees what escapes the application's routes only.

Constructors

Link copied to clipboard
constructor(manifest: Manifest, options: WowHttpOptions = WowHttpOptions())

Types

Link copied to clipboard

Properties

Link copied to clipboard
open override val order: Int

Functions

Link copied to clipboard
open override fun getOrder(): Int
Link copied to clipboard
open override fun handle(exchange: ServerWebExchange, ex: Throwable): Mono<Void>