UNPKG

mongodb-stitch

Version:

[![Join the chat at https://gitter.im/mongodb/stitch](https://badges.gitter.im/mongodb/stitch.svg)](https://gitter.im/mongodb/stitch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

29 lines (22 loc) 588 B
const _Error = function(message, code) { Error.call(this, message); if (Error.captureStackTrace) { Error.captureStackTrace(this); } this.message = message; this.name = this.constructor.name; if (code !== undefined) { this.code = code; } }; _Error.prototype = Object.create(Error.prototype); class StitchError extends _Error {} const ErrAuthProviderNotFound = 'AuthProviderNotFound'; const ErrInvalidSession = 'InvalidSession'; const ErrUnauthorized = 'Unauthorized'; export { StitchError, ErrAuthProviderNotFound, ErrInvalidSession, ErrUnauthorized };