Skip to content
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

middleware errors not logged #619

Open
Theodus opened this issue Feb 11, 2025 · 0 comments
Open

middleware errors not logged #619

Theodus opened this issue Feb 11, 2025 · 0 comments

Comments

@Theodus
Copy link
Member

Theodus commented Feb 11, 2025

I have encountered situations that are unnecessarily difficult to debug because an error result from a middleware function is neither reported in the response body nor logged via tracing. For example, when the attestation_middleware returns AttestationError::CouldNotFindSigner the response just has status 500 with no body explaining what went wrong and there are no logs indicating an issue:

  2025-02-11T15:43:29.023335Z  INFO indexer_service_rs::metrics: Serving prometheus metrics, address: 0.0.0.0:7300
    at crates/service/src/metrics.rs:39

  2025-02-11T15:43:29.023364Z  INFO indexer_service_rs::service: Serving requests, address: 0.0.0.0:7601
    at crates/service/src/service.rs:123

Only after building the indexer-service from source with additional logging was I able to discover where in the pile of middleware something went wrong. There should be logs for middleware errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant