Exception: ClaudeAgentSDK::CLIJSONDecodeError

Inherits:
ClaudeSDKError
  • Object
show all
Defined in:
lib/claude_agent_sdk/errors.rb

Overview

Raised when unable to decode JSON from CLI output

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line, original_error) ⇒ CLIJSONDecodeError

Returns a new instance of CLIJSONDecodeError.



40
41
42
43
44
# File 'lib/claude_agent_sdk/errors.rb', line 40

def initialize(line, original_error)
  @line = line
  @original_error = original_error
  super("Failed to decode JSON: #{line[0...100]}...")
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



38
39
40
# File 'lib/claude_agent_sdk/errors.rb', line 38

def line
  @line
end

#original_errorObject (readonly)

Returns the value of attribute original_error.



38
39
40
# File 'lib/claude_agent_sdk/errors.rb', line 38

def original_error
  @original_error
end