Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.catch(function (error) {
if (error.code === ErrorCode.PlatformError) {
// a platform error occurred, `error.message` contains error information, `error.data` contains the entire resp
console.error(error.message);
console.info(error.data);
} else {
// some other error occurred
console.error(error);
}
});
}