errors in the API try to carry along errors from the middleware