Sha256: 4c1272b4ab3d390d1c5d1ea76c413ec7d0a1947b4e0b9ef19dadafd1992f2967
Contents?: true
Size: 517 Bytes
Versions: 20
Compression:
Stored size: 517 Bytes
Contents
module RDStation class ErrorHandler class InvalidCredentials attr_reader :errors ERROR_CODE = 'ACCESS_DENIED'.freeze def initialize(errors) @errors = errors end def raise_error return if invalid_credentials_error.empty? raise RDStation::Error::InvalidCredentials, invalid_credentials_error.first end private def invalid_credentials_error errors.select { |error| error['error_type'] == ERROR_CODE } end end end end
Version data entries
20 entries across 20 versions & 1 rubygems