mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-03-01 12:44:37 +00:00
20 lines
502 B
TypeScript
20 lines
502 B
TypeScript
import { GraphQLError } from 'graphql'
|
|
|
|
export class UserInputError extends GraphQLError {
|
|
constructor(message: string) {
|
|
super(message, { extensions: { code: 'BAD_USER_INPUT' } })
|
|
}
|
|
}
|
|
|
|
export class AuthenticationError extends GraphQLError {
|
|
constructor(message: string) {
|
|
super(message, { extensions: { code: 'UNAUTHENTICATED' } })
|
|
}
|
|
}
|
|
|
|
export class ForbiddenError extends GraphQLError {
|
|
constructor(message: string) {
|
|
super(message, { extensions: { code: 'FORBIDDEN' } })
|
|
}
|
|
}
|