Class: SalesforceStreamer::ReplayIdErrorExtension
- Inherits:
-
Object
- Object
- SalesforceStreamer::ReplayIdErrorExtension
- Defined in:
- lib/salesforce_streamer/replay_id_error_extension.rb
Constant Summary collapse
- REPLAY_ERROR_REGEX =
/^400::The replayId /
Instance Method Summary collapse
Instance Method Details
#incoming(message, callback) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/salesforce_streamer/replay_id_error_extension.rb', line 5 def incoming(, callback) if ['error']&.match?(REPLAY_ERROR_REGEX) fail ReplayIdError, ['error'] end callback.call end |