skapi-js 1.0.0-alpha.20 → 1.0.0-alpha.21

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/js/main/skapi.js CHANGED
@@ -22,7 +22,7 @@ export default class Skapi {
22
22
  set user(value) {
23
23
  }
24
24
  constructor(service, owner, options) {
25
- this.version = '1.0.0-alpha.20';
25
+ this.version = '1.0.0-alpha.21';
26
26
  this.session = null;
27
27
  this.connection = null;
28
28
  this.host = 'skapi';
@@ -554,6 +554,9 @@ export async function changePassword(params) {
554
554
  else if (err?.code === "NotAuthorizedException") {
555
555
  rej(new SkapiError('Incorrect password.', { code: 'INVALID_REQUEST' }));
556
556
  }
557
+ else if (err?.code === "TooManyRequestsException") {
558
+ rej(new SkapiError('Too many attempts. Please try again later.', { code: 'REQUEST_EXCEED' }));
559
+ }
557
560
  else {
558
561
  rej(new SkapiError(err?.message || 'Failed to change user password.', { code: err?.code || err?.name }));
559
562
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skapi-js",
3
- "version": "1.0.0-alpha.20",
3
+ "version": "1.0.0-alpha.21",
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",