Ensure the given response is successful. If it isn’t, a corresponding ResponseError is returned.
ResponseError