[Bug] Gracefully Handle Horizon RPC Timeouts and 404 Errors #177
Open
Menjay7 wants to merge 1 commit into
Open
[Bug] Gracefully Handle Horizon RPC Timeouts and 404 Errors #177Menjay7 wants to merge 1 commit into
Menjay7 wants to merge 1 commit into
Conversation
Contributor
|
@Menjay7 CI test failed please check it out and fix it |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improve error handling for Horizon RPC requests by gracefully managing timeout scenarios and 404 Not Found responses. This prevents unnecessary application failures, improves user experience, and provides clearer feedback when network or resource issues occur.
Changes
Add dedicated handling for Horizon RPC timeout errors
Add handling for 404 Not Found responses from Horizon endpoints
Prevent unhandled exceptions from propagating to the UI
Implement user-friendly error messages for timeout and missing-resource scenarios
Add retry logic (where appropriate) for transient network failures
Improve logging and diagnostics for Horizon request failures
Standardize RPC error mapping across Horizon integrations
Ensure fallback behavior when Horizon data is temporarily unavailable
Testing
Add unit tests for timeout handling
Add unit tests for Horizon 404 responses
Add integration tests covering:
RPC request timeout scenarios
Missing account/resource lookups
Retry behavior for transient failures
Error propagation and user-facing messaging
Verify application stability under simulated Horizon outages
Motivation
Horizon RPC endpoints can occasionally return timeouts or 404 responses due to network conditions, indexing delays, or missing resources. The application should handle these cases gracefully to avoid crashes, improve reliability, and provide a better user experience.
Checklist
Added timeout handling for Horizon RPC requests
Added graceful handling for 404 Not Found responses
Improved error mapping and logging
Added retry/fallback behavior where appropriate
Added unit and integration tests
Updated documentation and error-handling notes
Verified no regressions in existing Horizon workflows...closed #160