Artifact Content
Not logged in

Artifact 8bf658f7fab94dfb57c908600f93b56c1d171ed7:


'use strict'

const BaseError = require('five-bells-shared/errors/base-error')

class EmailTakenError extends BaseError {
  async handler (ctx, log) {
    log.warn('Email taken: ' + this.message)
    ctx.status = 422
    ctx.body = {
      id: this.name,
      message: this.message
    }
  }
}

module.exports = EmailTakenError