Skip to content

cancelCallback function not called #77

Closed
@Youdaman

Description

@Youdaman

I setup a cancelCallback function as per the docs however it isn't called.

To test/repro, setup a security rule for a particular node in firebase and then intentionally send the wrong data (i.e. missing fields that are required by newData.hasChildren for example).

What I end up with is a warning in the browser console:
FIREBASE WARNING: set at /trips/-KcqIr6OQFk6vNPLFBTy failed: permission_denied

And also an error in the browser console:
Uncaught (in promise) Error: PERMISSION_DENIED: Permission denied

I was expecting the function specified via cancelCallback to be called but it's not.

I found I could manually catch any errors after the push using:
.then(function(success) {}, function(error) {});

However if I was to try console.log(error) in the above error catch it would print the entire callstack as a string. Possibly I'm doing it wrong but I would have expected an error object.

Either way I'm not having any luck getting cancelCallback working and any help would be appreciated :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions