Class: Rubino::LLM::ClassifiedError

Inherits:
Data
  • Object
show all
Defined in:
lib/rubino/llm/error_classifier.rb

Overview

Structured classification of an API error with recovery hints, mirroring the reference ClassifiedError. The retry loop checks these hints instead of re-classifying the error itself.

‘should_rotate_credential` is recorded for fidelity but is a NO-OP in this gem: there is no credential pool to rotate. `should_fallback` is likewise advisory until the FallbackChain lands (Slice 7).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



42
43
44
# File 'lib/rubino/llm/error_classifier.rb', line 42

def message
  @message
end

#reasonObject (readonly)

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



42
43
44
# File 'lib/rubino/llm/error_classifier.rb', line 42

def reason
  @reason
end

#retryableObject (readonly)

Returns the value of attribute retryable

Returns:

  • (Object)

    the current value of retryable



42
43
44
# File 'lib/rubino/llm/error_classifier.rb', line 42

def retryable
  @retryable
end

#should_compressObject (readonly)

Returns the value of attribute should_compress

Returns:

  • (Object)

    the current value of should_compress



42
43
44
# File 'lib/rubino/llm/error_classifier.rb', line 42

def should_compress
  @should_compress
end

#should_fallbackObject (readonly)

Returns the value of attribute should_fallback

Returns:

  • (Object)

    the current value of should_fallback



42
43
44
# File 'lib/rubino/llm/error_classifier.rb', line 42

def should_fallback
  @should_fallback
end

#should_rotate_credentialObject (readonly)

Returns the value of attribute should_rotate_credential

Returns:

  • (Object)

    the current value of should_rotate_credential



42
43
44
# File 'lib/rubino/llm/error_classifier.rb', line 42

def should_rotate_credential
  @should_rotate_credential
end

#status_codeObject (readonly)

Returns the value of attribute status_code

Returns:

  • (Object)

    the current value of status_code



42
43
44
# File 'lib/rubino/llm/error_classifier.rb', line 42

def status_code
  @status_code
end

Instance Method Details

#auth?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/rubino/llm/error_classifier.rb', line 46

def auth?
  reason == FailoverReason::AUTH
end