@itentialopensource/adapter-utils 4.48.7 → 4.48.8
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/CHANGELOG.md +10 -0
- package/lib/translatorUtil.js +11 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/lib/translatorUtil.js
CHANGED
|
@@ -1032,6 +1032,17 @@ class AdapterTranslatorUtil {
|
|
|
1032
1032
|
if (sysRes) {
|
|
1033
1033
|
errorObject.IAPerror.raw_response = sysRes;
|
|
1034
1034
|
}
|
|
1035
|
+
|
|
1036
|
+
// Mask sensitive fields in reqHdr
|
|
1037
|
+
const sensitiveWords = /auth|token|x|key/i;
|
|
1038
|
+
if (errorObject.IAPerror.raw_response && errorObject.IAPerror.raw_response.reqHdr) {
|
|
1039
|
+
Object.keys(errorObject.IAPerror.raw_response.reqHdr).forEach((key) => {
|
|
1040
|
+
if (sensitiveWords.test(key)) {
|
|
1041
|
+
errorObject.IAPerror.raw_response.reqHdr[key] = '****';
|
|
1042
|
+
}
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1035
1046
|
if (stack) {
|
|
1036
1047
|
errorObject.IAPerror.stack = stack;
|
|
1037
1048
|
}
|