UNPKG

graphql-constraint-directive

Version:
15 lines (12 loc) 376 B
module.exports = class ConstraintDirectiveError extends Error { ; constructor (fieldName, message, context) { super(message) this.name = this.constructor.name Error.captureStackTrace(this, this.constructor) this.code = 'ERR_GRAPHQL_CONSTRAINT_VALIDATION' this.fieldName = fieldName this.context = context this.originalError = undefined } }