Artifact Content
Not logged in

Artifact 21239113430d6a35d2e194ba396e6e273c60d428:


'use strict'

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

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

module.exports = InvalidLedgerError