opencrvs / opencrvs-core

A global solution to civil registration
https://www.opencrvs.org
Other
85 stars 67 forks source link

Resolve countUsersByLocation Sentry error in performance views #6343

Open euanmillar opened 9 months ago

euanmillar commented 9 months ago

Sentry is reporting a bug in Performance view, I think it is related to the stats window that calculates the number of employees related to a location because it appears in the thread initiated by countUsersByLocation:

https://opencrvs-foundation.sentry.io/issues/4618046521/?project=5830610&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=90d&stream_index=6

The locationStatistics/service.ts file is throwing this error:

"Total population extension not found for location, location ID: undefined"

Zangetsu101 commented 9 months ago

From the sentry http call stack, it looks like we are not handling the 404 statusCode when fetching a location by id.