From 0ed5206d9f8a81597466734a82d73332464001f5 Mon Sep 17 00:00:00 2001 From: mfo Date: Wed, 21 Aug 2024 16:25:43 +0200 Subject: [PATCH] fix(PopulateRNAJSONValueTask): edge case, one champ raises an URI::InvalidURIError --- app/tasks/maintenance/populate_rna_json_value_task.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/tasks/maintenance/populate_rna_json_value_task.rb b/app/tasks/maintenance/populate_rna_json_value_task.rb index 1e20a5cc9..71680f3fd 100644 --- a/app/tasks/maintenance/populate_rna_json_value_task.rb +++ b/app/tasks/maintenance/populate_rna_json_value_task.rb @@ -15,6 +15,8 @@ module Maintenance data = APIEntreprise::RNAAdapter.new(champ.value, champ&.dossier&.procedure&.id).to_params return if data.blank? champ.update(value_json: APIGeoService.parse_rna_address(data['adresse'])) + rescue URI::InvalidURIError + # some data raise this error end def count