sul-dlss/dor-services-app

View on GitHub
app/validators/cocina/validation_error.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

module Cocina
  # Raised when a validation fails
  class ValidationError < StandardError
    def initialize(message, status: :bad_request)
      super(message)
      @status = status
    end

    attr_reader :status
  end
end