Sha256: 9ba84c801fc2a251cbc6347a87c0295ddbcdfdc8b0889dd72db34bc6bf0ff4c5

Contents?: true

Size: 578 Bytes

Versions: 1

Compression:

Stored size: 578 Bytes

Contents

module RuleBasedValidator
  class InvalidRulesException < StandardError
    attr_reader :code, :status

    def initialize(message = "No se proporcionaron reglas válidas")
      super(message)
      @code = 17
      @status = 400
    end
  end
  
  # Excepción para parámetros inválidos
  class InvalidParametersException < StandardError
    attr_reader :code, :status, :message, :body

    def initialize(errors)
      super(message)
      @code    = 18
      @status  = 400
      @message = 'Parámetros inválidos'
      @body    = { errors: errors }
    end
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rule_based_validator-0.2.4 lib/rule_based_validator/exceptions.rb