eservices-core 1.0.348 → 1.0.351
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/dist/index.js +9 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* eservices-core v1.0.
|
|
2
|
+
* eservices-core v1.0.351
|
|
3
3
|
* (c) 2022 ESERVICES
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -2116,9 +2116,12 @@ function requestHandler(callback, options = {}) {
|
|
|
2116
2116
|
* Показывается плашка сверху сайта
|
|
2117
2117
|
* */
|
|
2118
2118
|
if (options.error) {
|
|
2119
|
-
console.log(error);
|
|
2119
|
+
console.log(error.details);
|
|
2120
2120
|
if (error instanceof CoreError)
|
|
2121
|
-
NotificationSystem.add('error', error.message,
|
|
2121
|
+
NotificationSystem.add('error', error.message, {
|
|
2122
|
+
children: error.details || [],
|
|
2123
|
+
timeout: 12 * 1000
|
|
2124
|
+
});
|
|
2122
2125
|
else {
|
|
2123
2126
|
NotificationSystem.add('error', error);
|
|
2124
2127
|
}
|
|
@@ -4757,10 +4760,8 @@ class authService {
|
|
|
4757
4760
|
.catch(authService.parseError);
|
|
4758
4761
|
}
|
|
4759
4762
|
static parseProcessAnswer(answer) {
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
if (wrongStatus.includes(status))
|
|
4763
|
-
throw CoreError.UndefinedError(status);
|
|
4763
|
+
if (answer.statusCode > 4)
|
|
4764
|
+
throw CoreError.UndefinedError(answer.statusName.replace(/([A-Z][a-z])/g, ' $1').replace(/(\d)/g, ' $1'));
|
|
4764
4765
|
return answer;
|
|
4765
4766
|
}
|
|
4766
4767
|
static startRegistrationProcess(values) {
|
|
@@ -4817,7 +4818,7 @@ class authService {
|
|
|
4817
4818
|
.then(authService.parseLoginProcessAnswer);
|
|
4818
4819
|
}
|
|
4819
4820
|
static parseLoginProcessAnswer(answer) {
|
|
4820
|
-
if (answer.statusCode
|
|
4821
|
+
if (answer.statusCode > 3)
|
|
4821
4822
|
throw CoreError.UndefinedError(answer.statusName.replace(/([A-Z][a-z])/g, ' $1').replace(/(\d)/g, ' $1'));
|
|
4822
4823
|
return answer;
|
|
4823
4824
|
}
|