-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[public-api] improve request exception logging #19179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
895242f
to
59d5a54
Compare
Starting preview... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM (sans this comment), tested and works. 🏁
✔️ to unblock (re-ping if you want another review 👍)
59d5a54
to
2f49ea8
Compare
@geropl i overcomplicated it, but using proper APIs even with stream response headers are enough. I pushed an update. Fine to unhold? If server stream fails after succesful connection requestId is present: If server stream is not able to connect at all requestId is missing: |
/unhold |
Cool, let's go! |
Description
During rollout we see some functions are failing with Unknown reason, but they are not logged on server side and there is no information to correlate them from a client side. This PR ensures that all exceptional situations are logged on server side, plus on client side we provide request id and method to look up the entire chain in logs.
It also fixes a missing conversion for invalid argument which is reported as Unknown reason right now.
Summary generated by Copilot
🤖[deprecated] Generated by Copilot at 895242f
This pull request improves the error handling, tracing, and documentation of the public API communication between the dashboard and the server components. It uses the
handleError
andPublicAPIConverter
functions to report errors consistently and with context information. It also adds a README file to thecomponents/public-api/typescript-common
package and updates the test case for the error message change.Related Issue(s)
Fixes #
How to test
x-request-id
response header (for any status code)public api exception
.reportError
has info aboutrequestId
as well asrequestMethod
.Documentation
Preview status
https://ak-request9e413561ca.preview.gitpod-dev.com/workspaces
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold