-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue #2521] Have the error response always return an internal reque…
…st ID (#2523) ## Summary Fixes #2521 ### Time to review: __3 mins__ ## Changes proposed Return the internal request ID in all error responses ## Context for reviewers A follow-up from a discussion we had yesterday. This can aid in debugging as a user can just give us the ID and we can easily look up the corresponding logs. Note `g` in Flask is a request-local global context (ie. each request has their own separate `g`) which we use for storing a few other logging related things already safely. https://flask.palletsprojects.com/en/3.0.x/appcontext/#storing-data ## Additional information <img width="1082" alt="Screenshot 2024-10-18 at 12 15 49 PM" src="https://github.com/user-attachments/assets/e47874ed-8219-447c-947c-1c1bbd48f775"> <img width="715" alt="Screenshot 2024-10-18 at 12 16 09 PM" src="https://github.com/user-attachments/assets/f3b921e4-f52f-4882-b017-5d3275100c7f"> <img width="558" alt="Screenshot 2024-10-18 at 12 17 05 PM" src="https://github.com/user-attachments/assets/0ea12677-8632-46d6-bf1b-153ada50add6"> An example of the logs that show the internal ID - note I trimmed out the full error message as it's a very long stack trace. ![Screenshot 2024-10-18 at 12 17 25 PM](https://github.com/user-attachments/assets/e923f84d-e295-4719-9d80-65ac98f13ca8) --------- Co-authored-by: nava-platform-bot <platform-admins@navapbc.com>
- Loading branch information
1 parent
28a5a56
commit 45a677c
Showing
5 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters