Skip to content

Commit

Permalink
Merge pull request #852 from CruGlobal/hs-1132003-payment-error-logging
Browse files Browse the repository at this point in the history
[HS-1132003] Log network errors in Rollbar
  • Loading branch information
canac authored Apr 4, 2024
2 parents 9fc9ce2 + a038d58 commit d8c1911
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/scripts/services/error.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Rollbar } from 'scripts/errorNotify.js';

angular.module('confRegistrationWebApp').factory('error', function ($log) {
return {
// Generate a promise catch handler that generates an Error object from an HTTP response object
errorFromResponse: function (defaultErrorMessage) {
return function (res) {
Rollbar.error(defaultErrorMessage, res);
$log.error(res);

// Extract the error from the payload
Expand Down

0 comments on commit d8c1911

Please sign in to comment.