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.
183 184 185 186 187 188 |
# File 'lib/legion/llm/errors.rb', line 183 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.
181 182 183 |
# File 'lib/legion/llm/errors.rb', line 181 def got @got end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
181 182 183 |
# File 'lib/legion/llm/errors.rb', line 181 def header @header end |
#valid ⇒ Object (readonly)
Returns the value of attribute valid.
181 182 183 |
# File 'lib/legion/llm/errors.rb', line 181 def valid @valid end |
Instance Method Details
#retryable? ⇒ Boolean
190 |
# File 'lib/legion/llm/errors.rb', line 190 def retryable? = false |