Declare statusCode variable before use

Got introduced in 57cc823598ee90a59ad9bbf0ebfd0be9ecae8157.
The error handler itself crashed and exceptions from request handlers were silently swallowed.
It might be good if errors within web-pockets internals were never silently swallowed?
Also, I couldn't find a test that's throwing an error and testing the response :)

Edit: I remember now, there's #2 which improves error handling and has a test for it. Need anything done to get #2 in?