ampersand
ampersand copied to clipboard
Generated onPreResponse hook blows up on a 404 route
I tried to add new API endpoints in hapi, and missed the one I needed. My Ampersand then hit the missing endpoint, hapi generated a 404 response, but the hook tries to blindly dereference request.response.state, which causes an error. While this is clearly he result of a PEBKAC, it'd be more useful if the generated code didn't crash, letting the 404 through so the twit in the chair can more easily see the 404 and diagnose the problem.