-
Notifications
You must be signed in to change notification settings - Fork 24
Enhance middleware error reporting and logging without breaking changes #660
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
- Add detailed error logging in attestation middleware - Enhance signer middleware with better error reporting - Improve error responses with structured JSON format - Maintain backward compatibility with existing behavior - Add tests for error handling scenarios This change addresses debugging challenges by adding proper tracing while preserving the original middleware behavior.
7fee8e5 to
da3fc4f
Compare
Pull Request Test Coverage Report for Build 13979872372Details
💛 - Coveralls |
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.
Nice! I take it this came out of the experience of working on testing patterns?
Yes, I am having trouble to get test scripts running and just get :
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< connection: close
< content-length: 0
< date: Thu, 20 Mar 2025 21:07:00 GMT
which is not that helpful. I am trying to submit a receipt.
I will need to do similar changes in the tap receipt handler as well, but that would be in another PR
TypeLevelConsoli
left a comment
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.
great, I'm all in for structured errors
Thanks! @TypeLevelConsoli for suggestion, indeed, that way is clearer |
Co-authored-by: consoli <[email protected]>
Co-authored-by: consoli <[email protected]>
4b533de to
b7183b2
Compare
This PR improves error reporting and logging in our middleware components(for attestation) without changing their existing behavior. It addresses issues where errors in middleware functions were neither reported in response bodies(just an error code) nor logged via tracing, making debugging unnecessarily difficult.
Key Changes
ErrorResponsefor better client feedbackFixes #619 - Error results from middleware functions not reported in logs or responses