-
Notifications
You must be signed in to change notification settings - Fork 14
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
perf: add JSON.stringify to show load error message #42
Conversation
WalkthroughThe recent updates across various modules enhance error and warning message details by incorporating JSON stringification of relevant data. This change makes debugging more straightforward by providing the exact URLs or data elements that are causing issues during asset loading operations. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yaml
Files selected for processing (2)
- packages/effects-core/src/asset-manager.ts (5 hunks)
- packages/effects-core/src/downloader.ts (2 hunks)
Additional comments: 8
packages/effects-core/src/asset-manager.ts (5)
170-170: The use of
JSON.stringify
to serialize the URL in the timeout rejection message is consistent with the PR's objective to improve error messaging.305-305: The error message for invalid bins source correctly uses
JSON.stringify
to serialize thebins
object, which should help in debugging issues related to bins loading.328-328: The warning message for invalid font sources now includes the font URL serialized with
JSON.stringify
, aligning with the PR's goal to enhance error messages.486-486: The error message for failing to load JSON now includes the serialized URL, which is a good use of
JSON.stringify
to provide more detailed error information.497-497: The error message for failing to load bins is improved by including the serialized URL with
JSON.stringify
, which is in line with the PR's objectives.packages/effects-core/src/downloader.ts (3)
164-164: The use of
JSON.stringify
to serialize thesource
parameter in the error message is a good practice for debugging, as it provides a clear and complete representation of the data causing the issue.187-187: Wrapping the error object in
JSON.stringify
within the rejection callback will provide more detailed information about the error, which is beneficial for debugging purposes.161-167: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [164-187]
Ensure that the serialized error information does not contain sensitive data that could lead to security concerns or PII leakage.
Summary by CodeRabbit