Skip to content

Commit

Permalink
Merge pull request #2018 from BaseAdresseNationale/jugurtha/reduce-er…
Browse files Browse the repository at this point in the history
…ror-log

Reduce verbosity of error logs for commune  page, flag, and EPCI fetches
  • Loading branch information
jbouhadoun authored Jan 24, 2025
2 parents 3925fb0 + 49a77f9 commit b62c29b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/commune/[codeCommune]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,22 @@ export default async function CommunePage({ params }: CommunePageProps) {
])

if (mairiePageResponse.status === 'rejected') {
console.error(`Failed to get mairie page URL for commune ${codeCommune}`, mairiePageResponse.reason)
console.error(`Failed to get mairie page URL for commune ${codeCommune}`, mairiePageResponse.reason?.message)
}
const mairiePageUrl = mairiePageResponse.status === 'fulfilled' ? mairiePageResponse.value : null

if (communeFlagResponse.status === 'rejected') {
console.error(`Failed to get commune flag for commune ${codeCommune}`, communeFlagResponse.reason)
console.error(`Failed to get commune flag for commune ${codeCommune}`, communeFlagResponse.reason?.message)
}
const communeFlagUrl = communeFlagResponse.status === 'fulfilled' ? communeFlagResponse.value : null

if (EPCIResponse.status === 'rejected') {
console.error(`Failed to get EPCI for commune ${codeCommune}`, EPCIResponse.reason)
console.error(`Failed to get EPCI for commune ${codeCommune}`, EPCIResponse.reason?.message)
}
const EPCI = EPCIResponse.status === 'fulfilled' ? EPCIResponse.value : null

if (lastRevisionsDetailsResponse.status === 'rejected') {
console.error(`Failed to get last revisions details for commune ${codeCommune}`, lastRevisionsDetailsResponse.reason)
console.error(`Failed to get last revisions details for commune ${codeCommune}`, lastRevisionsDetailsResponse.reason?.message)
}
const lastRevisionsDetails = lastRevisionsDetailsResponse.status === 'fulfilled' ? lastRevisionsDetailsResponse.value : null

Expand Down

0 comments on commit b62c29b

Please sign in to comment.