diff --git a/app/jobs/api_entreprise/exercices_job.rb b/app/jobs/api_entreprise/exercices_job.rb index fd8b5c682..f288c6773 100644 --- a/app/jobs/api_entreprise/exercices_job.rb +++ b/app/jobs/api_entreprise/exercices_job.rb @@ -1,4 +1,7 @@ class ApiEntreprise::ExercicesJob < ApiEntreprise::Job + rescue_from(ApiEntreprise::API::BadFormatRequest) do |exception| + end + def perform(etablissement_id, procedure_id) etablissement = Etablissement.find(etablissement_id) etablissement_params = ApiEntreprise::ExercicesAdapter.new(etablissement.siret, procedure_id).to_params diff --git a/app/jobs/application_job.rb b/app/jobs/application_job.rb index d7de32266..767b53f1a 100644 --- a/app/jobs/application_job.rb +++ b/app/jobs/application_job.rb @@ -13,10 +13,6 @@ class ApplicationJob < ActiveJob::Base error(self, exception) end - rescue_from(ApiEntreprise::API::BadFormatRequest) do |exception| - error(self, exception) - end - def error(job, exception) Raven.capture_exception(exception) end