Check if exception code is valid HTTP code in default error handler