lamassu-server/lib/new-admin/graphql/errors/authentication.js
Sérgio Salgado dcd3259484 feat: customer notes migration
feat: customer notes backend operations

feat: add customer note mutation
feat: add editing capabilities to PropertyCard
feat: connect customer notes backend to frontend
fix: customer note form and static content styling

fix: SQL uppercasing

fix: set default value for notes content
fix: SQL after dev rebase
refactor: move get current user token to separate method
2021-12-09 22:31:51 +00:00

37 lines
1,015 B
JavaScript

const { ApolloError, AuthenticationError } = require('apollo-server-express')
class InvalidCredentialsError extends ApolloError {
constructor(message) {
super(message, 'INVALID_CREDENTIALS')
Object.defineProperty(this, 'name', { value: 'InvalidCredentialsError' })
}
}
class UserAlreadyExistsError extends ApolloError {
constructor(message) {
super(message, 'USER_ALREADY_EXISTS')
Object.defineProperty(this, 'name', { value: 'UserAlreadyExistsError' })
}
}
class InvalidTwoFactorError extends ApolloError {
constructor(message) {
super(message, 'INVALID_TWO_FACTOR_CODE')
Object.defineProperty(this, 'name', { value: 'InvalidTwoFactorError' })
}
}
class InvalidUrlError extends ApolloError {
constructor(message) {
super(message, 'INVALID_URL_TOKEN')
Object.defineProperty(this, 'name', { value: 'InvalidUrlError' })
}
}
module.exports = {
AuthenticationError,
InvalidCredentialsError,
UserAlreadyExistsError,
InvalidTwoFactorError,
InvalidUrlError
}