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

[Relay White Noise Error] Improve Error Code Mapping for Mirror Node Failures #3442

Open
quiet-node opened this issue Feb 3, 2025 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@quiet-node
Copy link
Member

Problem

The JSON RPC Relay currently maps all Mirror Node 5xx errors (500, 502, 503, 504) to a generic 500 Internal Server Error when responding to clients. This lack of granular error mapping makes it difficult for clients to differentiate between transient failures, gateway issues, and actual server-side problems.

From our investigation, the majority of failures stem from:

  • 502 Bad Gateway (99% of 5xx errors) – Indicates an upstream Mirror Node failure.
  • 503 Service Unavailable – Suggests that the Mirror Node is temporarily overloaded or undergoing maintenance.
  • 504 Gateway Timeout – Indicates that the Mirror Node request took too long to process.

By improving how these errors are mapped, the Relay can provide more informative responses, allowing clients to handle failures more effectively and reducing unnecessary retries.

Solution

Enhance the Relay's error handling by implementing a more precise mapping mechanism - return 502, 503, and 504 to clients instead of a generic 500, preserving the original failure reason.

Alternatives

No response

@quiet-node quiet-node added the enhancement New feature or request label Feb 3, 2025
@quiet-node quiet-node added this to the 0.67.0 milestone Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant