Exception: JetstreamBridge::PublishError

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

Overview

Publisher errors with enriched context

Instance Attribute Summary collapse

Attributes inherited from Error

#context

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, event_id: nil, subject: nil, context: {}) ⇒ PublishError



28
29
30
31
32
# File 'lib/jetstream_bridge/errors.rb', line 28

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

Instance Attribute Details

#event_idObject (readonly)

Returns the value of attribute event_id.



26
27
28
# File 'lib/jetstream_bridge/errors.rb', line 26

def event_id
  @event_id
end

#subjectObject (readonly)

Returns the value of attribute subject.



26
27
28
# File 'lib/jetstream_bridge/errors.rb', line 26

def subject
  @subject
end