Merge pull request #10275 from demarches-simplifiees/fix_api_entreprise_status

Tech: corrige le mécanisme de surveillance des fournisseurs d entreprise.api.gouv.fr
This commit is contained in:
LeSim 2024-04-08 08:08:38 +00:00 committed by GitHub
commit 22830fd7f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 45 additions and 52 deletions

View file

@ -12,7 +12,7 @@ module RNAChampAssociationFetchableConcern
update!(data: data)
rescue APIEntreprise::API::Error => error
error_key = :network_error if error.try(:network_error?) && !APIEntrepriseService.api_up?
error_key = :network_error if error.try(:network_error?) && !APIEntrepriseService.api_djepva_up?
clear_association!(error_key)
end

View file

@ -11,7 +11,7 @@ module SiretChampEtablissementFetchableConcern
update!(etablissement: etablissement)
rescue => error
if error.try(:network_error?) && !APIEntrepriseService.api_up?
if error.try(:network_error?) && !APIEntrepriseService.api_insee_up?
# TODO: notify ops
update!(
etablissement: APIEntrepriseService.create_etablissement_as_degraded_mode(self, siret, user.id)