Modify intended handler queue
Pre-release
Pre-release
Now the ExceptionHandler does not send the modified response. Likewise, the SendingHandler now calls $next()
before sending instead of after. This means the SendingHandler should be first in the queue, so that it sends the response after it has been returned from all other middleware after it, and the ExceptionHandler should be next after the SendingHandler to catch exceptions from further down the middleware queue.