Exception: Bybit::ParseError

Inherits:
TransportError show all
Defined in:
lib/bybit/error.rb

Overview

Body did not parse or didn't match Bybit V5 ApiResponse shape. body holds the raw payload (truncated in the message but full in the attr) so consumers can log CDN / maintenance-page HTML for post-mortem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, body: nil, http_status: nil) ⇒ ParseError

Returns a new instance of ParseError.



49
50
51
52
53
# File 'lib/bybit/error.rb', line 49

def initialize(message, body: nil, http_status: nil)
  @body = body
  @http_status = http_status
  super(message)
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



47
48
49
# File 'lib/bybit/error.rb', line 47

def body
  @body
end

#http_statusObject (readonly)

Returns the value of attribute http_status.



47
48
49
# File 'lib/bybit/error.rb', line 47

def http_status
  @http_status
end