Skip to content

Commit

Permalink
pass the operation JSON to the error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
mackuba committed May 16, 2024
1 parent 13c911c commit 0c032db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/didkit/plc_importer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def ignore_errors=(val)
@ignore_errors = val

if val
@error_handler = proc { |e| "(ignore error)" }
@error_handler = proc { |e, j| "(ignore error)" }
else
@error_handler = nil
end
Expand All @@ -56,7 +56,7 @@ def fetch_page
begin
PLCOperation.new(json)
rescue PLCOperation::FormatError, AtHandles::FormatError, ServiceRecord::FormatError => e
@error_handler ? @error_handler.call(e) : raise
@error_handler ? @error_handler.call(e, json) : raise
end
end

Expand Down

0 comments on commit 0c032db

Please sign in to comment.