CanineHQ/canine · error · Rancher::Client::UnauthorizedError
Unauthorized to access Rancher
Error message
Unauthorized to access Rancher
What it means
Error "Unauthorized to access Rancher" thrown in CanineHQ/canine.
Source
Thrown at lib/rancher/client.rb:106
rescue Socket::ResolutionError
raise ConnectionError, "Rancher URL is not resolvable"
rescue Net::ReadTimeout, Net::OpenTimeout
raise ConnectionError, "Connection to Rancher timed out"
end
private
def headers
@headers ||= {
'Content-Type' => 'application/json',
'Authorization' => "Bearer #{api_token}"
}
end
def fetch_wrapper(&block)
response = yield
raise UnauthorizedError, "Unauthorized to access Rancher" if response.code == 401
raise PermissionDeniedError, "Permission denied to access Rancher" if response.code == 403
if response.success?
response.parsed_response
else
raise "Failed to fetch from Rancher: #{response.code} #{response.body}"
end
end
end
end
View on GitHub (pinned to ba4ee3968d)
When it happens
Trigger: Thrown at lib/rancher/client.rb:106 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of CanineHQ/canine@ba4ee3968d (2026-08-23).
Data as JSON: /api/errors/1555d05ff4aeff34.
Report an issue: GitHub.