@churchapps/apphelper 0.4.32 → 0.4.34
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/ErrorHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAI/E,qBAAa,WAAW;IAEvB,MAAM,CAAC,UAAU,EAAE,MAAM;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IACtG,MAAM,CAAC,kBAAkB,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAEjE,MAAM,CAAC,IAAI,GAAI,YAAY,MAAM,qBAAqB,EAAE,oBAAoB,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,UAGhH;IAED,MAAM,CAAC,QAAQ,GAAI,WAAW,MAAM,EAAE,SAAS,MAAM,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"ErrorHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/ErrorHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAI/E,qBAAa,WAAW;IAEvB,MAAM,CAAC,UAAU,EAAE,MAAM;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IACtG,MAAM,CAAC,kBAAkB,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAEjE,MAAM,CAAC,IAAI,GAAI,YAAY,MAAM,qBAAqB,EAAE,oBAAoB,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,UAGhH;IAED,MAAM,CAAC,QAAQ,GAAI,WAAW,MAAM,EAAE,SAAS,MAAM,EAAE,SAAS,MAAM,UA0BtE;CAEA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
var _a;
|
|
2
|
-
import { ApiHelper } from "@churchapps/helpers";
|
|
3
2
|
export class ErrorHelper {
|
|
4
3
|
}
|
|
5
4
|
_a = ErrorHelper;
|
|
@@ -26,7 +25,8 @@ ErrorHelper.logError = (errorType, message, details) => {
|
|
|
26
25
|
if (log.message.indexOf("clientErrors") > -1)
|
|
27
26
|
return;
|
|
28
27
|
try {
|
|
29
|
-
|
|
28
|
+
// Error posting to /errors endpoint disabled
|
|
29
|
+
// ApiHelper.postAnonymous("/clientErrors", [log], "MembershipApi");
|
|
30
30
|
}
|
|
31
31
|
catch (error) {
|
|
32
32
|
console.log(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorHelper.js","sourceRoot":"","sources":["../../src/helpers/ErrorHelper.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ErrorHelper.js","sourceRoot":"","sources":["../../src/helpers/ErrorHelper.ts"],"names":[],"mappings":";AAIA,MAAM,OAAO,WAAW;;;AAKhB,gBAAI,GAAG,CAAC,UAAuC,EAAE,kBAAyD,EAAE,EAAE;IACpH,EAAW,CAAC,UAAU,GAAG,UAAU,CAAC;IACpC,EAAW,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AACrD,CAAC,AAHU,CAGV;AAEM,oBAAQ,GAAG,CAAC,SAAiB,EAAE,OAAe,EAAE,OAAe,EAAE,EAAE;IAC1E,IAAI,EAAI,CAAC,UAAU,EAAE,CAAC;QACrB,MAAM,IAAI,GAAG,EAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,MAAM,GAAG,GAAsB;YAC9B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO;SAChB,CAAA;QAED,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QAE9B,IAAI,GAAG,CAAC,SAAS,KAAK,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;YAAE,OAAO;QAChF,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;YAAE,OAAO;QACrD,IAAI,CAAC;YACJ,6CAA6C;YAC7C,oEAAoE;QACrE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QACnB,CAAC;QACD,IAAI,EAAW,CAAC,kBAAkB;YAAE,EAAW,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;IACzE,CAAC;AACF,CAAC,AA1Be,CA0Bf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@churchapps/apphelper",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.34",
|
|
4
4
|
"description": "Library of helper functions for React and NextJS ChurchApps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"react-router-dom": "^7.6.3"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@churchapps/helpers": "^1.
|
|
36
|
+
"@churchapps/helpers": "^1.1.1",
|
|
37
37
|
"@emotion/cache": "^11.14.0",
|
|
38
38
|
"@emotion/react": "^11.14.0",
|
|
39
39
|
"@emotion/styled": "^11.14.1",
|
|
@@ -13,30 +13,31 @@ export class ErrorHelper {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
static logError = (errorType: string, message: string, details: string) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
console.log("ERROR LOG", log);
|
|
30
|
-
|
|
31
|
-
if (log.errorType === "401" && log.message.indexOf("/users/login") > -1) return;
|
|
32
|
-
if (log.message.indexOf("clientErrors") > -1) return;
|
|
33
|
-
try {
|
|
34
|
-
ApiHelper.postAnonymous("/clientErrors", [log], "MembershipApi");
|
|
35
|
-
} catch (error) {
|
|
36
|
-
console.log(error)
|
|
37
|
-
}
|
|
38
|
-
if (ErrorHelper.customErrorHandler) ErrorHelper.customErrorHandler(log);
|
|
16
|
+
if (this.getAppData) {
|
|
17
|
+
const data = this.getAppData();
|
|
18
|
+
const log: ErrorLogInterface = {
|
|
19
|
+
application: data.application,
|
|
20
|
+
errorTime: new Date(),
|
|
21
|
+
userId: data.userId,
|
|
22
|
+
churchId: data.churchId,
|
|
23
|
+
originUrl: data.originUrl,
|
|
24
|
+
errorType: errorType,
|
|
25
|
+
message: message,
|
|
26
|
+
details: details
|
|
39
27
|
}
|
|
28
|
+
|
|
29
|
+
console.log("ERROR LOG", log);
|
|
30
|
+
|
|
31
|
+
if (log.errorType === "401" && log.message.indexOf("/users/login") > -1) return;
|
|
32
|
+
if (log.message.indexOf("clientErrors") > -1) return;
|
|
33
|
+
try {
|
|
34
|
+
// Error posting to /errors endpoint disabled
|
|
35
|
+
// ApiHelper.postAnonymous("/clientErrors", [log], "MembershipApi");
|
|
36
|
+
} catch (error) {
|
|
37
|
+
console.log(error)
|
|
38
|
+
}
|
|
39
|
+
if (ErrorHelper.customErrorHandler) ErrorHelper.customErrorHandler(log);
|
|
40
40
|
}
|
|
41
|
+
}
|
|
41
42
|
|
|
42
43
|
}
|