Skip to Content
PredictorSDK

Every response carries an X-Request-Id

Each response, success or error, now has an X-Request-Id header naming that one request, so you can quote it when you report a problem.

New

Every response from the API now carries an X-Request-Id header: a short opaque string that names that one request. It is on successes and on every error, including the 404 for a path that matches no route, the 405 for a wrong method, a rejected query parameter, a bad key (401), a 402 and a 429. When a call fails or surprises you, quote the id and we can find the request in our logs.

The id is opaque, so do not parse it or rely on its length or prefix. The API makes a new one for every request (a retry gets its own) and ignores any X-Request-Id you send, so it is not a way to tag your own requests. The generated SDKs already read the header on their errors: error.requestId in TypeScript, error.headers in Python and core.APIError.Header in Go. TypeScript's requestId was always empty before, because the API sent no id. See error handling.