Request IDs
Black gives every request an ID of its own and returns it in the Request-Id header of the response. A successful response and a failed one both carry it.
Read the request ID
The ID starts with req_, followed by 26 lowercase letters and digits:
req_01m76yzrj5cmerzrn6cb3tde11
Treat it as an opaque string: do not parse it.
Two requests never share an ID, even when they send the same call again.
Find the request ID in an error
A failed response holds the same ID in error.request_id, so you can read it from the body when you do not keep the headers. See Errors for the error shape.
Give the request ID to support
Log the Request-Id of every call that fails or answers in a way you do not expect. When you contact support about it, send the request ID: support asks for it, and it identifies the request in Black's logs.