bkper 2.6.0 → 2.6.2
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.
|
@@ -98,8 +98,9 @@ class HttpApiRequest {
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
catch (e) {
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
const customError = HttpApiRequest.config.requestErrorHandler ? HttpApiRequest.config.requestErrorHandler(e) : undefined;
|
|
102
|
+
if (customError) {
|
|
103
|
+
throw customError;
|
|
103
104
|
}
|
|
104
105
|
else {
|
|
105
106
|
//Default error handler
|
|
@@ -147,8 +148,10 @@ function getAccessToken() {
|
|
|
147
148
|
if (local_auth_service_1.isLoggedIn() && token == null) {
|
|
148
149
|
token = yield local_auth_service_1.getOAuthToken();
|
|
149
150
|
}
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
if (token) {
|
|
152
|
+
token = token.replace('Bearer ', '');
|
|
153
|
+
token = token.replace('bearer ', '');
|
|
154
|
+
}
|
|
152
155
|
return token;
|
|
153
156
|
});
|
|
154
157
|
}
|