Exception: E2B::BuildError

Inherits:
E2BError
  • Object
show all
Defined in:
lib/e2b/errors.rb

Overview

Error raised when a template build fails or returns an invalid status

Direct Known Subclasses

FileUploadError

Instance Attribute Summary collapse

Attributes inherited from E2BError

#headers, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status_code: nil, headers: {}, step: nil, source_location: nil) ⇒ BuildError

Returns a new instance of BuildError.



66
67
68
69
70
71
# File 'lib/e2b/errors.rb', line 66

def initialize(message = nil, status_code: nil, headers: {}, step: nil, source_location: nil)
  @step = step
  @source_location = source_location
  super(message, status_code: status_code, headers: headers)
  set_backtrace([source_location]) if source_location
end

Instance Attribute Details

#source_locationObject (readonly)

Returns the value of attribute source_location.



64
65
66
# File 'lib/e2b/errors.rb', line 64

def source_location
  @source_location
end

#stepObject (readonly)

Returns the value of attribute step.



64
65
66
# File 'lib/e2b/errors.rb', line 64

def step
  @step
end