Guides
Request IDs
Every request is tagged with a unique X-Request-Id header. The SDK generates a UUID for each call. You can supply your own value by passing it through the headers option on a per-call basis.
The server echoes the request id back in the response. Quote it when you contact support about a specific call — it lets the team locate the exact request in server logs.
Where to find the request id
On a successful response the id is on the page or response object.
const page = await bimpe.agents.list();
console.log(page.requestId);On any ApiError it is on the error itself.
try {
await bimpe.agents.retrieve('missing-id');
} catch (error) {
if (error instanceof ApiError) {
console.log(error.requestId);
}
}To send your own request id, pass it in headers.
await bimpe.agents.create({ name: 'A' }, { headers: { 'X-Request-Id': 'my-trace-id' } });On a successful response the id is on the page object.
page = client.agents.list()
print(page.request_id)On any APIError it is on the error itself.
from bimpeai import APIError
try:
client.agents.retrieve("missing-id")
except APIError as err:
print(err.request_id)To send your own request id, pass it in headers.
client.agents.create(name="A", headers={"X-Request-Id": "my-trace-id"})