Exception: Legion::LLM::Errors::InvalidHeader
- Defined in:
- lib/legion/llm/errors.rb
Overview
An x-legion-* header carried an unrecognized value (e.g. invalid tier name). Raised by PayloadBuilder at ingress per G31. HTTP 400.
Instance Attribute Summary collapse
-
#got ⇒ Object
readonly
Returns the value of attribute got.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#valid ⇒ Object
readonly
Returns the value of attribute valid.
Instance Method Summary collapse
-
#initialize(header:, got:, valid: [], message: nil) ⇒ InvalidHeader
constructor
A new instance of InvalidHeader.
- #retryable? ⇒ Boolean
Constructor Details
#initialize(header:, got:, valid: [], message: nil) ⇒ InvalidHeader
Returns a new instance of InvalidHeader.
170 171 172 173 174 175 |
# File 'lib/legion/llm/errors.rb', line 170 def initialize(header:, got:, valid: [], message: nil, **) @header = header @got = got @valid = valid super( || "invalid value #{got.inspect} for header #{header.inspect}; valid: #{valid.inspect}") end |
Instance Attribute Details
#got ⇒ Object (readonly)
Returns the value of attribute got.
168 169 170 |
# File 'lib/legion/llm/errors.rb', line 168 def got @got end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
168 169 170 |
# File 'lib/legion/llm/errors.rb', line 168 def header @header end |
#valid ⇒ Object (readonly)
Returns the value of attribute valid.
168 169 170 |
# File 'lib/legion/llm/errors.rb', line 168 def valid @valid end |
Instance Method Details
#retryable? ⇒ Boolean
177 |
# File 'lib/legion/llm/errors.rb', line 177 def retryable? = false |