Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* Copyright 2016 DanceDeets.
*
* @flow
*/
import StackTrace from 'stacktrace-js';
import { StackdriverErrorReporter } from 'stackdriver-errors-js';
window.StackTrace = StackTrace;
const errorHandler = new StackdriverErrorReporter();
if (window.prodMode) {
errorHandler.start({
key: 'AIzaSyAvvrWfamjBD6LqCURkATAWEovAoBm1xNQ', // Website Key (referrer-locked)
projectId: '911140565156',
});
}
serverConfigService.getConfig().subscribe((config: ConfigResponse) => {
if (!config.publicApiKeyForErrorReports) {
return;
}
const r = new StackdriverErrorReporter();
r.start({
key: config.publicApiKeyForErrorReports,
projectId: config.projectId,
});
this.stackdriverReporter = r;
setStackdriverErrorReporter(r);
});
}