Feature #15318

[API] Include X-Request-Id value in every RailsAPI error message

Added by Ward Vandewege 11 days ago. Updated 4 days ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
1.0

Description

Background:
  • Some SDKs (including Python) send an X-Request-Id value with each API request, but the calling application doesn't necessarily report it to the user.
  • Controller adds an X-Request-Id value to each request if the caller didn't supply one -- so every RailsAPI request has an X-Request-Id value.
  • Each RailsAPI error response has an "error token" value generated by RailsAPI, which is meant to help correlate client-reported errors with RailsAPI server logs. However, the calling application doesn't necessarily report this to the user along with the error message.

Improvement: Every RailsAPI error response should include the current X-Request-Id value in the message text.

This way, even tools that only display the error message itself without response metadata -- e.g., arvados-cwl-runner -- will convey the request ID to the user, and ops can use that error report to grep RailsAPI, controller, and nginx logs for related entries.

History

#1 Updated by Tom Clegg 4 days ago

  • Description updated (diff)
  • Subject changed from [API] expose requestID when Rails throws an error that is reported to a client. This should expose requestID when a-c-r errors out. to [API] Include X-Request-Id value in every RailsAPI error message

#2 Updated by Tom Morris 4 days ago

  • Story points set to 1.0

#3 Updated by Tom Morris 4 days ago

  • Target version changed from To Be Groomed to Arvados Future Sprints

Also available in: Atom PDF