Skip to content
Snippets Groups Projects
Commit ce73f890 authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Only warn when a commun depcom is invalid

parent 5e213246
No related branches found
No related tags found
No related merge requests found
Pipeline #18300 passed
......@@ -299,7 +299,7 @@
{ headers: { Accept: "application/json" } },
)
if (!response.ok) {
console.error(
console.warn(
`Error ${
response.status
} while retrieving commune from Insee code\n\n${await response.text()}`,
......@@ -308,7 +308,7 @@
}
const { distributions_postales, error } = await response.json()
if (error !== undefined) {
console.error(
console.warn(
`Error while retrieving commune from Insee code\n\n${JSON.stringify(error, null, 2)}`,
)
return null
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment