Artifact Content
Not logged in

Artifact 29091000717c771341ddf6ddedfd453f86785d22:


'use strict'

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

class InvalidLedgerAccountError extends BaseError {
  async handler (ctx, log) {
    log.warn('Invalid ledger account: ' + this.message)
    ctx.status = 422
    ctx.body = {
      id: this.name,
      message: this.message
    }
  }
}

module.exports = InvalidLedgerAccountError