wallaby-cash 2.0.2 → 2.0.4

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.esm.js CHANGED
@@ -7048,13 +7048,10 @@ class Base {
7048
7048
  if (((_e = error.response) === null || _e === void 0 ? void 0 : _e.data.errorCode) && error.response.data.errorCode === ErrorResponseCodes.user_already_exists) {
7049
7049
  return error.response.data;
7050
7050
  }
7051
- if (((_f = error.response) === null || _f === void 0 ? void 0 : _f.data.errorCode) && error.response.data.errorCode === ErrorResponseCodes.user_already_exists) {
7052
- return error.response.data;
7053
- }
7054
- return Promise.reject(error.message);
7051
+ return Promise.reject((_f = error.response) === null || _f === void 0 ? void 0 : _f.data);
7055
7052
  }
7056
7053
  logger.error('SDK::Base::RequestMethod.Post::error', error);
7057
- return Promise.reject(error);
7054
+ return Promise.reject(error.message);
7058
7055
  }
7059
7056
  case RequestMethod.Put:
7060
7057
  try {
@@ -8399,14 +8396,6 @@ class AuthService extends Base {
8399
8396
  message: 'Password must be at least 8 characters long',
8400
8397
  };
8401
8398
  }
8402
- // Check if password contains at least 1 number
8403
- const hasNumber = /\d/.test(password);
8404
- if (!hasNumber) {
8405
- return {
8406
- valid: false,
8407
- message: 'Password must contain at least 1 number',
8408
- };
8409
- }
8410
8399
  // Check maximum length (128 characters) to avoid DDoS attacks
8411
8400
  if (password.length > 128) {
8412
8401
  return {