Module: Alma::Error

Included in:
ResultSet
Defined in:
lib/alma/error.rb

Instance Method Summary collapse

Instance Method Details

#errorObject



12
13
14
# File 'lib/alma/error.rb', line 12

def error
  @response.fetch("web_service_result", {}) || {}
end

#error_messageObject



8
9
10
# File 'lib/alma/error.rb', line 8

def error_message
  (has_error?) ? error["errorList"]["error"]["errorMessage"] : ""
end

#has_error?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/alma/error.rb', line 4

def has_error?
  !error.empty?
end