make sure backend errors are given a correct status code