skapi-js 1.0.0-alpha.21 → 1.0.0-alpha.22
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/skapi.js +1 -1
- package/dist/skapi.js.map +1 -1
- package/dist/skapi.module.js +1 -1
- package/dist/skapi.module.js.map +1 -1
- package/js/main/skapi.js +1 -1
- package/js/methods/user.js +7 -1
- package/package.json +1 -1
package/js/main/skapi.js
CHANGED
package/js/methods/user.js
CHANGED
|
@@ -244,6 +244,12 @@ export function authentication() {
|
|
|
244
244
|
error = ['Incorrect username or password.', 'INCORRECT_USERNAME_OR_PASSWORD'];
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
+
else if (err.code === "UserNotFoundException") {
|
|
248
|
+
error = ['Incorrect username or password.', 'INCORRECT_USERNAME_OR_PASSWORD'];
|
|
249
|
+
}
|
|
250
|
+
else if (err.code === "TooManyRequestsException" || err.code === "LimitExceededException") {
|
|
251
|
+
error = ['Too many attempts. Please try again later.', 'REQUEST_EXCEED'];
|
|
252
|
+
}
|
|
247
253
|
let errCode = error[1];
|
|
248
254
|
let errMsg = error[0];
|
|
249
255
|
let customErr = error[0].split('#');
|
|
@@ -554,7 +560,7 @@ export async function changePassword(params) {
|
|
|
554
560
|
else if (err?.code === "NotAuthorizedException") {
|
|
555
561
|
rej(new SkapiError('Incorrect password.', { code: 'INVALID_REQUEST' }));
|
|
556
562
|
}
|
|
557
|
-
else if (err?.code === "TooManyRequestsException") {
|
|
563
|
+
else if (err?.code === "TooManyRequestsException" || err?.code === "LimitExceededException") {
|
|
558
564
|
rej(new SkapiError('Too many attempts. Please try again later.', { code: 'REQUEST_EXCEED' }));
|
|
559
565
|
}
|
|
560
566
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skapi-js",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.22",
|
|
4
4
|
"description": "Javascript library for Skapi: Complete JAM Stack, front-end driven serverless backend API service.",
|
|
5
5
|
"main": "./dist/skapi.module.js",
|
|
6
6
|
"types": "./js/Main.d.ts",
|