ampersand icon indicating copy to clipboard operation
ampersand copied to clipboard

Generated onPreResponse hook blows up on a 404 route

Open Kev opened this issue 10 years ago • 0 comments

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.

Kev avatar Nov 05 '14 07:11 Kev