Their use allows more sophisticated handling of certain types of exceptions, particularly around error messages.
For example, the responses ::missing-params
and ::failed-spec
both produce a 400 “bad request” response. But because Ataraxy distinguishes them internally, you can dispatch off an unambiguous key.
With regard to mixing in middleware, the middleware should be added after the response is resolved. If it’s not doing that, then that’s a bug!