Exception: BrightData::ScrapeTimeoutError

Inherits:
Error
  • Object
show all
Defined in:
lib/brightdata/errors.rb

Overview

Raised when ‘/scrape` exceeds Bright Data’s 60-second synchronous cap.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, snapshot_id:, snapshot: nil) ⇒ ScrapeTimeoutError

Returns a new instance of ScrapeTimeoutError.

Parameters:

  • message (String)

    human-readable error message

  • snapshot_id (String)

    snapshot ID returned by Bright Data

  • snapshot (BrightData::Snapshot, nil) (defaults to: nil)

    snapshot object that can be waited on



73
74
75
76
77
# File 'lib/brightdata/errors.rb', line 73

def initialize(message, snapshot_id:, snapshot: nil)
  super(message)
  @snapshot_id = snapshot_id
  @snapshot = snapshot
end

Instance Attribute Details

#snapshotBrightData::Snapshot? (readonly)

Returns resumable snapshot returned by Bright Data.

Returns:



68
69
70
# File 'lib/brightdata/errors.rb', line 68

def snapshot
  @snapshot
end

#snapshot_idString (readonly)

Returns snapshot ID returned by Bright Data.

Returns:

  • (String)

    snapshot ID returned by Bright Data



65
66
67
# File 'lib/brightdata/errors.rb', line 65

def snapshot_id
  @snapshot_id
end