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.
148 149 150 151 152 153 |
# File 'lib/legion/llm/errors.rb', line 148 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.
146 147 148 |
# File 'lib/legion/llm/errors.rb', line 146 def got @got end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
146 147 148 |
# File 'lib/legion/llm/errors.rb', line 146 def header @header end |
#valid ⇒ Object (readonly)
Returns the value of attribute valid.
146 147 148 |
# File 'lib/legion/llm/errors.rb', line 146 def valid @valid end |
Instance Method Details
#retryable? ⇒ Boolean
155 |
# File 'lib/legion/llm/errors.rb', line 155 def retryable? = false |