@hubspot/local-dev-lib 4.0.2 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lang/en.json +2 -1
- package/lib/trackUsage.js +6 -1
- package/package.json +1 -1
package/lang/en.json
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
"invalidEvent": "Usage tracking event {{ eventName }} is not a valid event type.",
|
|
5
5
|
"sendingEventAuthenticated": "Sending usage event to authenticated endpoint",
|
|
6
6
|
"retryingEventUnauthenticated": "Failed to send the usage event as authenticated. Trying again as unauthenticated.",
|
|
7
|
-
"sendingEventUnauthenticated": "Sending usage event to unauthenticated endpoint"
|
|
7
|
+
"sendingEventUnauthenticated": "Sending usage event to unauthenticated endpoint",
|
|
8
|
+
"unauthenticatedSendFailed": "Failed to send usage event to unauthenticated endpoint"
|
|
8
9
|
},
|
|
9
10
|
"archive": {
|
|
10
11
|
"extractZip": {
|
package/lib/trackUsage.js
CHANGED
|
@@ -59,6 +59,11 @@ async function trackUsage(eventName, eventClass, meta = {}, accountId) {
|
|
|
59
59
|
resolveWithFullResponse: true,
|
|
60
60
|
});
|
|
61
61
|
logger_1.logger.debug((0, lang_1.i18n)(`${i18nKey}.sendingEventUnauthenticated`));
|
|
62
|
-
|
|
62
|
+
try {
|
|
63
|
+
await (0, client_1.httpClient)({ ...axiosConfig, method: 'post' });
|
|
64
|
+
}
|
|
65
|
+
catch (e) {
|
|
66
|
+
logger_1.logger.debug((0, lang_1.i18n)(`${i18nKey}.unauthenticatedSendFailed`));
|
|
67
|
+
}
|
|
63
68
|
}
|
|
64
69
|
exports.trackUsage = trackUsage;
|