Assign error to request.
Implement debug middleware.
Assert on debug middleware, closes #57.