-
Notifications
You must be signed in to change notification settings - Fork 108
add error_stack on reject also reject error not string #21
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
I'll take a look at this today - initially I used strings because they are easiest to represent in Firebase, and perhaps we don't want to coerce every rejection with a string into an Error object, but a stack trace would be a useful addition |
Ok cool, yeah i wasn't sure about the error stack as far as privacy/security is concerned either. It might need to go in an "errors" bucket and just reference it. I was thinking could just do a |
In using the queue, I've tended to lock down the I'm curious whether that's a pattern other people are using, or whether read access is indeed required in some use-cases? If read access is required, then you're right that adding stack traces could be a security concern |
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.
I'm not sure how useful this being an error would be - won't the stack trace always be an internal Firebase Queue node module trace? Won't they be able to get that information from the error message string itself?
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.
Ah, sorry, was confused for a second between reject
and _reject
- this could be useful
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.
Event though the stack trace might not be helpful in all cases, it's nice just to be consistent. Also might help later on if more of the internal api is exposed and can be built upon.
Yeah true. I was thinking too of converting stack trace into Jain so it could be saved to firebase more easily. |
I included these changes in #24 with a few minor adjustments. The major changes were
Take a look and let me know if there's something I missed. Let's move the conversation there |
Wanted to start a discussion about 2 things,