Improve preload handling and error resilience#456
Open
kartik098ki wants to merge 2 commits intoOneBusAway:developfrom
Open
Improve preload handling and error resilience#456kartik098ki wants to merge 2 commits intoOneBusAway:developfrom
kartik098ki wants to merge 2 commits intoOneBusAway:developfrom
Conversation
Refined existing Tailwind component styles and fixed minor inconsistencies in dark mode and borders. Added reusable UI components including card, input, badge, loader, divider, skeleton, and gradient button to improve design consistency and scalability. Also enhanced existing components for better responsiveness and visual consistency across light and dark themes.
This change improves the server-side preload logic by making it more robust and efficient. Previously, preload tasks were executed using Promise.all, which could break the request flow if any one task failed. This has been replaced with Promise.allSettled to ensure the application continues running even if one of the preload operations fails. A simple guard has also been added to avoid running the preload logic on every request, reducing unnecessary work and improving performance. Errors are now logged properly, making debugging easier in case something goes wrong.
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.
This PR improves the server-side preload logic by making it more reliable and efficient.
Previously, preload operations were executed using Promise.all, which could cause the entire request to fail if any one task failed. This has been updated to Promise.allSettled so that failures in individual tasks do not break the request flow.
A guard has also been added to prevent the preload logic from running on every request, reducing unnecessary work and improving performance.
Basic error logging has been included to make debugging easier in case of failures.