fix the response code in case of internal error

(bad copy paste)