-
Couldn't load subscription status.
- Fork 133
Description
I tried running one of our apps in the Brave browser which has native add/tracking built in.
Unfortately this breaks our app, as we are relying on the success and failure callbacks on the sendAmplitudeEvent method to do app functionality after an element has been interacted with.
The devtools show a net::ERR_BLOCKED_BY_CLIENT error, which bypasses Request's handling and requires a try catch to catch properly.
The issue seems to be that all errors are being swallowed by by an empty try-catch as can be seen on the following line:
Amplitude-JavaScript/src/amplitude-client.js
Line 1856 in 85fbc6b
| } catch (e) { |
This of course might be red herring, and there could be another way to catch errors thrown at this level. We've tried surrounding the whole method in a try-catch but this does not catch the error.
try {
sendAmplitudeEvent(
{
page: pageDetails,
element: `${linkName} ${linkType}`,
action: "Click",
},
eventProperties,
onSuccess,
onError
);
} catch {
console.log("amplitude error");
}Would it be possible to have the error callback triggered as a result of the trycatch failure here? Or should we be looking into another solution?