class BerkeleyLibrary::TIND::API::BaseURINotSet
Exception raised when the TIND
base URI is nil or blank.
Public Class Methods
format_message(endpoint, params)
click to toggle source
# File lib/berkeley_library/tind/api/api_exception.rb, line 119 def format_message(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
new(endpoint, params)
click to toggle source
@param endpoint [String, Symbol] the endpoint @param params [Hash, nil] the query parameters
Calls superclass method
BerkeleyLibrary::TIND::API::APIException::new
# File lib/berkeley_library/tind/api/api_exception.rb, line 113 def initialize(endpoint, params) msg = BaseURINotSet.format_message(endpoint, params) super(msg, status_code: 404) end