Exception: BerkeleyLibrary::TIND::API::BaseURINotSet
- Inherits:
-
APIException
- Object
- StandardError
- APIException
- BerkeleyLibrary::TIND::API::BaseURINotSet
- Defined in:
- lib/berkeley_library/tind/api/api_exception.rb
Overview
Exception raised when the TIND base URI is nil or blank.
Instance Attribute Summary
Attributes inherited from APIException
#params, #response, #status_code, #status_message, #url
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(endpoint, params) ⇒ BaseURINotSet
constructor
A new instance of BaseURINotSet.
Methods inherited from APIException
Constructor Details
#initialize(endpoint, params) ⇒ BaseURINotSet
Returns a new instance of BaseURINotSet.
113 114 115 116 |
# File 'lib/berkeley_library/tind/api/api_exception.rb', line 113 def initialize(endpoint, params) msg = BaseURINotSet.(endpoint, params) super(msg, status_code: 404) end |
Class Method Details
.format_message(endpoint, params) ⇒ Object
119 120 121 122 123 124 125 126 |
# File 'lib/berkeley_library/tind/api/api_exception.rb', line 119 def (endpoint, params) "request to endpoint #{endpoint.inspect}".tap do |msg| if (query_string = API.format_query(params)) msg << " with query #{query_string}" end msg << ' failed; base URI not set' end end |