Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return 'typeOfFacility';
}
}
}
// If no CC enabled systems and toc is podiatry, show modal
if (isPodiatry(state)) {
dispatch(showTypeOfCareUnavailableModal());
return 'typeOfCare';
}
dispatch(updateFacilityType(FACILITY_TYPES.VAMC));
return 'vaFacility';
} catch (e) {
Sentry.captureException(e);
Sentry.captureMessage(
'Community Care eligibility check failed with errors',
);
dispatch(updateFacilityType(FACILITY_TYPES.VAMC));
return 'vaFacility';
}
}
dispatch(updateFacilityType(FACILITY_TYPES.VAMC));
return nextState;
},
previous: 'home',
_reportError(error) {
this._logger.error('WebChannel error:', error.message);
Sentry.captureMessage('WebChannel error: ' + error.message, {
// manually capture the stack as a custom field
extra: {
stackTrace: error.stack,
},
});
},
}).catch(res => {
if (res instanceof Error) {
Sentry.captureException(res);
Sentry.captureMessage('vets_burial_poll_client_error');
// keep polling because we know they submitted earlier
// and this is likely a network error
return Promise.resolve();
}
// if we get here, it's likely that we hit a server error
return Promise.reject(res);
});
}
.catch(res => {
if (res instanceof Error) {
Sentry.captureException(res);
Sentry.captureMessage('vets_pension_poll_client_error');
// keep polling because we know they submitted earlier
// and this is likely a network error
return Promise.resolve();
}
// if we get here, it's likely that we hit a server error
return Promise.reject(res);
});
}
onUpdateFailed: () => {
console.log('[ServiceWorker]: Update failed.');
Sentry.captureMessage(
'Service Worker update failed',
Sentry.Severity.Error
);
},
onInstalled: () => {
.catch(() => {
Sentry.captureMessage('itf_fetch_failed');
dispatch({ type: ITF_FETCH_FAILED });
});
};
Sentry.withScope(scope => {
scope.setExtra('props', this.props);
scope.setExtra('state', this.state);
Sentry.captureMessage('Onboarding no project name');
});
}
private processError(error: any): void {
if (error instanceof Error || error instanceof ErrorEvent) {
Sentry.captureException(error);
}
if (error instanceof HttpErrorResponse) {
if (error.error instanceof ErrorEvent) {
Sentry.captureException(error.error);
}
Sentry.captureMessage(`${error.status}: ${error.error}`, Severity.Error);
}
Sentry.captureMessage(error);
}
}