Exception: Rubino::UpstreamError

Inherits:
Error
  • Object
show all
Defined in:
lib/rubino/errors.rb

Overview

Upstream dependency failed (LLM provider, OAuth provider). Maps to 502. Message-first so raise UpstreamError, “timeout” works; pass service: to tag the failing dependency (it gets prefixed onto the message).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = "upstream error", service: nil) ⇒ UpstreamError

Returns a new instance of UpstreamError.



86
87
88
89
# File 'lib/rubino/errors.rb', line 86

def initialize(message = "upstream error", service: nil)
  super(service ? "#{service}: #{message}" : message)
  @service = service
end

Instance Attribute Details

#serviceObject (readonly)

Returns the value of attribute service.



90
91
92
# File 'lib/rubino/errors.rb', line 90

def service
  @service
end