Commit 8e7648d7 authored by David Fernandez's avatar David Fernandez

Merge branch 'debian_catch_standarderror' into 'master'

Catch all errors when processing Debian changes

See merge request gitlab-org/gitlab!69141
parents efae1f8f 55f4fe66
...@@ -22,12 +22,7 @@ module Packages ...@@ -22,12 +22,7 @@ module Packages
return unless package_file && user return unless package_file && user
::Packages::Debian::ProcessChangesService.new(package_file, user).execute ::Packages::Debian::ProcessChangesService.new(package_file, user).execute
rescue ArgumentError, rescue StandardError => e
Packages::Debian::ExtractChangesMetadataService::ExtractionError,
Packages::Debian::ExtractDebMetadataService::CommandFailedError,
Packages::Debian::ExtractMetadataService::ExtractionError,
Packages::Debian::ParseDebian822Service::InvalidDebian822Error,
ActiveRecord::RecordNotFound => e
Gitlab::ErrorTracking.log_exception(e, package_file_id: @package_file_id, user_id: @user_id) Gitlab::ErrorTracking.log_exception(e, package_file_id: @package_file_id, user_id: @user_id)
package_file.destroy! package_file.destroy!
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment