Class: Cline::Log::Error

Inherits:
Schema
  • Object
show all
Defined in:
lib/cline/log.rb

Overview

Top-level error wrapper (the err field in error logs)

Instance Attribute Summary

Attributes inherited from Schema

#extra_attributes

Public API collapse

Methods inherited from Schema

#==, as_hash, cast, cline_snake_attributes, of_hash, #to_cline_json, #to_hash

Instance Method Details

#aggregate_errorsArray<ApiError>?

Returns Aggregate errors from retry attempts.

Returns:

  • (Array<ApiError>, nil)

    Aggregate errors from retry attempts



69
# File 'lib/cline/log.rb', line 69

attribute :aggregate_errors, Utils::Schema.collection(ApiError)

#errorsArray<ApiError>?

Returns Individual errors in a retry chain.

Returns:

  • (Array<ApiError>, nil)

    Individual errors in a retry chain



66
# File 'lib/cline/log.rb', line 66

attribute :errors, Utils::Schema.collection(ApiError)

#last_errorApiError?

Returns Last error in a retry chain.

Returns:

  • (ApiError, nil)

    Last error in a retry chain



72
# File 'lib/cline/log.rb', line 72

attribute :last_error, ApiError

#messageString?

Returns Human-readable error message.

Returns:

  • (String, nil)

    Human-readable error message



54
# File 'lib/cline/log.rb', line 54

attribute :message, :string

#nameString?

Returns Error class name (e.g. "AI_RetryError").

Returns:

  • (String, nil)

    Error class name (e.g. "AI_RetryError")



60
# File 'lib/cline/log.rb', line 60

attribute :name, :string

#reasonString?

Returns Reason for the error (e.g. "maxRetriesExceeded").

Returns:

  • (String, nil)

    Reason for the error (e.g. "maxRetriesExceeded")



63
# File 'lib/cline/log.rb', line 63

attribute :reason, :string

#stackString?

Returns Error stack trace.

Returns:

  • (String, nil)

    Error stack trace



57
# File 'lib/cline/log.rb', line 57

attribute :stack, :string

#typeString?

Returns Error type identifier.

Returns:

  • (String, nil)

    Error type identifier



51
# File 'lib/cline/log.rb', line 51

attribute :type, :string