Skip to content

Commit

Permalink
Continue
Browse files Browse the repository at this point in the history
  • Loading branch information
julik committed Mar 20, 2024
1 parent ff29c3c commit 637b156
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/zipline/zip_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ def initialize(streamer, logger)
@streamer = streamer
@logger = logger
end

def handle_file(file, name, options)
write_item(file, name, options)
rescue => e
# Since most APM packages do not trace errors occurring within streaming
# Rack bodies, it can be helpful to print the error to the Rails log at least
error_message = "zipline: an exception (#{e.inspect}) was raised when serving the ZIP body."
error_message += " The error occurred when handling file #{name.inspect}"
error_message += " The error occurred when handling file #{name.inspect} which was a #{file.class}"
@logger&.error(error_message)
raise
end
Expand All @@ -37,6 +37,6 @@ def pick_retriever_for(item)
return maybe_retriever if maybe_retriever
end

raise "Don't know how to handle a file in the shape of #{file_argument.inspect}" unless retriever
raise "Don't know how to handle a file in the shape of #{item.inspect}"
end
end

0 comments on commit 637b156

Please sign in to comment.