trm-core 6.5.0 → 6.5.1
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/README.md +2 -0
- package/changelog.txt +4 -0
- package/dist/client/RESTClient.js +14 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,3 +22,5 @@ Make sure to open an issue first.
|
|
|
22
22
|
Contributions will be merged upon approval.
|
|
23
23
|
|
|
24
24
|
[Click here](https://docs.trmregistry.com/#/CONTRIBUTING) for the full list of TRM contribution guidelines.
|
|
25
|
+
|
|
26
|
+
[<img src="https://trmregistry.com/public/contributors?image=true">](https://docs.trmregistry.com/#/?id=contributors)
|
package/changelog.txt
CHANGED
|
@@ -107,7 +107,7 @@ class RESTClient {
|
|
|
107
107
|
}
|
|
108
108
|
catch (k) {
|
|
109
109
|
messageError = k;
|
|
110
|
-
message = `Couldn't read error message ${axiosError.response.data.message.
|
|
110
|
+
message = `Couldn't read error message ${axiosError.response.data.message.msgid} ${axiosError.response.data.message.msgno} ${axiosError.response.data.message.msgv1} ${axiosError.response.data.message.msgv2} ${axiosError.response.data.message.msgv3} ${axiosError.response.data.message.msgv4}`;
|
|
111
111
|
}
|
|
112
112
|
var rfcClientError = new _1.RESTClientError(error.message, sapMessage, axiosError, message);
|
|
113
113
|
if (messageError) {
|
|
@@ -137,10 +137,19 @@ class RESTClient {
|
|
|
137
137
|
const aT100 = yield this.readTable('T100', [{ fieldName: 'SPRSL' }, { fieldName: 'ARBGB' }, { fieldName: 'MSGNR' }, { fieldName: 'TEXT' }], `SPRSL EQ '${this._cLangu}' AND ARBGB EQ '${data.class}' AND MSGNR EQ '${msgnr}'`);
|
|
138
138
|
if (aT100.length === 1 && aT100[0].text) {
|
|
139
139
|
var msg = aT100[0].text;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
var counter = 1;
|
|
141
|
+
do {
|
|
142
|
+
if (msg.includes(`&${counter}`)) {
|
|
143
|
+
msg = msg.replace(new RegExp(`&${counter}`, 'gmi'), data[`v${counter}`] || '');
|
|
144
|
+
msg = msg.replace(new RegExp(`&${counter}&`, 'gmi'), data[`v${counter}`] || '');
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
msg = msg.replace("&", data[`v${counter}`] || '');
|
|
148
|
+
}
|
|
149
|
+
counter++;
|
|
150
|
+
} while (counter <= 4);
|
|
151
|
+
msg = msg.replace(new RegExp(`&\\d*`, 'gmi'), '');
|
|
152
|
+
msg = msg.replace(new RegExp(`&`, 'gmi'), '');
|
|
144
153
|
return msg.trim();
|
|
145
154
|
}
|
|
146
155
|
else {
|