-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(image): uncaught error in promise with image handling #6453
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
fix(image): uncaught error in promise with image handling #6453
Conversation
|
Hi and thanks for the PR! The team have been quite busy baking the upcoming NativeScript 5.0 release. We hope you love it as much as we do! The major release is the reason we taking longer with PR reviews. We will resume active reviewing in the following weeks. Thanks for your patience and for being awesome contributor! |
| return new Promise<http.HttpResponse>((resolve, reject) => { | ||
|
|
||
| if (!options.url) { | ||
| reject('Request url was empty.'); |
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.
Can you reject with an error (reject(new Error('Request url was empty.'));) to be consistent with the other reject path.
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.
Good call 👍 Updated now.
vakrilov
left a comment
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.
Approve - once the comment is addressed.
b625cf0 to
f7ee2bd
Compare
|
test |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
PR Checklist
What is the current behavior?
Apps can error if url is invalid or response content is invalid.
What is the new behavior?
Error is properly caught and rejected to avoid
Error: Uncaught (in promise)errors.