default to HTTP 500 if an error occurs