Sha256: 34f45315d6f144989fb247d5ab3184d180207975df3a4dd7bd132ab3cfded12b
Contents?: true
Size: 653 Bytes
Versions: 16
Compression:
Stored size: 653 Bytes
Contents
require_relative 'conflicting_field' require_relative 'invalid_event_type' module RDStation class ErrorHandler class BadRequest BAD_REQUEST_ERRORS = [ ErrorHandler::ConflictingField, ErrorHandler::InvalidEventType, ].freeze def initialize(array_of_errors) @array_of_errors = array_of_errors end def raise_error error_classes.each(&:raise_error) raise RDStation::Error::BadRequest, @array_of_errors.first end private def error_classes BAD_REQUEST_ERRORS.map do |error| error.new(@array_of_errors) end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems