Skip to content

Commit

Permalink
fix(FEC-10635): Add catch handler for Kava HTTP request (#89)
Browse files Browse the repository at this point in the history
handle promise rejection on send xhr analytics
  • Loading branch information
Yuvalke authored Nov 25, 2020
1 parent 88b80e3 commit 426e5f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kava.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class Kava extends BasePlugin {
}
}
this.logger.debug(`Sending KAVA event ${model.eventType}:${eventObj.type}`);
this.sendAnalytics(model);
this.sendAnalytics(model).catch(() => {});
}

_handleServerResponseSuccess(response: Object, model: Object): void {
Expand All @@ -278,7 +278,7 @@ class Kava extends BasePlugin {
}

_handleServerResponseFailed(err: Object, model: Object): void {
this.logger.error(`Failed to send KAVA event`, model, err);
this.logger.warn(`Failed to send KAVA event`, model, err);
}

_addBindings(): void {
Expand Down

0 comments on commit 426e5f8

Please sign in to comment.