Default to 500 in error handler