firebase-element icon indicating copy to clipboard operation
firebase-element copied to clipboard

Firing an event when a set or update fails

Open ericdes opened this issue 9 years ago • 2 comments
trafficstars

Hello,

I would like to listen to 'set' or 'update' failures (e.g. because of a rule not matching, etc).

I wrote a quick fix for myself in Typescript:

  this.query.child(key).set(value, (error) => {
    this._log(error);
    this.fire('firebase-set-error', error);
  }); 

However I think it'd better be implemented following your coding style, but I'm not really fluent in Javascript... And you probably have a pattern in mind...

Please let me know your thoughts. Eric.

ericdes avatar Nov 22 '15 16:11 ericdes

+1

GeoloeG-IsT avatar Dec 13 '15 12:12 GeoloeG-IsT

:+1:

redian avatar Dec 13 '15 12:12 redian