in stackdriver-errors.js [42:64]
StackdriverErrorReporter.prototype.start = function(config) {
if (!config.key && !config.targetUrl && !config.customReportingFunction) {
throw new Error('Cannot initialize: No API key, target url or custom reporting function provided.');
}
if (!config.projectId && !config.targetUrl && !config.customReportingFunction) {
throw new Error('Cannot initialize: No project ID, target url or custom reporting function provided.');
}
this.customReportingFunction = config.customReportingFunction;
this.apiKey = config.key;
this.projectId = config.projectId;
this.targetUrl = config.targetUrl;
this.context = config.context || {};
this.serviceContext = {service: config.service || 'web'};
if (config.version) {
this.serviceContext.version = config.version;
}
this.reportUncaughtExceptions = config.reportUncaughtExceptions !== false;
this.reportUnhandledPromiseRejections = config.reportUnhandledPromiseRejections !== false;
this.disabled = !!config.disabled;
registerHandlers(this);
};