fix: capture error message correctly

This commit is contained in:
prafull-opensignlabs
2024-09-25 21:22:48 +05:30
parent 6ea254d9ac
commit 2433c68f27
+1 -1
View File
@@ -1926,7 +1926,7 @@ export const getAppLogo = async () => {
}
} catch (err) {
console.log("err in getlogo ", err);
if (err?.includes("is not valid JSON")) {
if (err?.message?.includes("valid JSON")) {
return { logo: appInfo.applogo, user: "exist", error: "invalid_json" };
} else {
return { logo: appInfo.applogo, user: "exist" };