Exception: JetstreamBridge::ConsumerError

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

Overview

Consumer errors with delivery context

Direct Known Subclasses

HandlerError, InboxError

Instance Attribute Summary collapse

Attributes inherited from Error

#context

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, event_id: nil, deliveries: nil, context: {}) ⇒ ConsumerError

Returns a new instance of ConsumerError.



58
59
60
61
62
# File 'lib/jetstream_bridge/errors.rb', line 58

def initialize(message = nil, event_id: nil, deliveries: nil, context: {})
  @event_id = event_id
  @deliveries = deliveries
  super(message, context: context.merge(event_id: event_id, deliveries: deliveries).compact)
end

Instance Attribute Details

#deliveriesObject (readonly)

Returns the value of attribute deliveries.



56
57
58
# File 'lib/jetstream_bridge/errors.rb', line 56

def deliveries
  @deliveries
end

#event_idObject (readonly)

Returns the value of attribute event_id.



56
57
58
# File 'lib/jetstream_bridge/errors.rb', line 56

def event_id
  @event_id
end