const classafButter::BadStatusErr

sys::Obj
  sys::Err
    afButter::BadStatusErr

Throw by ErrOnXxxMiddleware when a HTTP response returns a bad status code.

To prevent BadStatusErrs from being thrown, just disable the relevant middleware. For example, to prevent a BadStatusErr from being thrown when a 404 is returned:

butterDish.errOn4xxx.enabled = false

To prevent a BadStatusErr from being thrown when a 500 is returned:

butterDish.errOn5xxx.enabled = false 
body

Source

const Str? body

The body of the failing HTTP response (if a string)

make

Source

new make(Str reqMethod, Uri reqUrl, Int statusCode, Str statusMsg, Str? body := null, Err? cause := null)

Create a BadStatusErr.

reqMethod

Source

const Str reqMethod

The failing HTTP request Method

reqUrl

Source

const Uri reqUrl

The failing HTTP request URL

statusCode

Source

const Int statusCode

The failing HTTP response status code

statusMsg

Source

const Str statusMsg

The failing HTTP response status message

toStr

Source

virtual override Str toStr()

Pre-pends the list of available values to the stack trace.