[WEB-881] fix: Sentry errors from previous build (#4142)

* Sentry Fix for "Non-Error promise rejection captured with value: Route change to url was aborted"

* Sentry fix for "undefined is not an object (evaluating 'n.response')"

* Possible Sentry Fix for "TypeError Function.entries(<anonymous>)"

* Possible Sentry fix for "null is not an object (evaluating 'e.type')"
This commit is contained in:
rahulramesha 2024-04-09 13:12:14 +05:30 committed by GitHub
parent 03df410b52
commit 95580d0c62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 32 additions and 27 deletions

View file

@ -152,6 +152,8 @@ export const getNumberCount = (number: number): string => {
export const objToQueryParams = (obj: any) => {
const params = new URLSearchParams();
if (!obj) return params.toString();
for (const [key, value] of Object.entries(obj)) {
if (value !== undefined && value !== null) params.append(key, value as string);
}