Maybe we should avoid the states entirely and just send a response?
Although what happens if the error occurs after the response has been sent?