@xuda.io/ai_module 1.1.5375 → 1.1.5377

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.
Files changed (2) hide show
  1. package/index.mjs +4 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -11241,6 +11241,9 @@ export const validate_credits_limit = async function (uid, profile_id) {
11241
11241
  let { data: ai_credits } = await account_ms.get_account_ai_usage({ uid: account_profile_info.uid });
11242
11242
 
11243
11243
  if (ai_credits.credits.total - ai_credits.usage.total < -0.5) {
11244
- throw new Error(`ai credits reach to hard limit`);
11244
+ let err = new Error(`ai credits reach to hard limit`);
11245
+ err.credit_limit_error = true;
11246
+ err.account_id = account_profile_info.uid;
11247
+ return err;
11245
11248
  }
11246
11249
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/ai_module",
3
- "version": "1.1.5375",
3
+ "version": "1.1.5377",
4
4
  "description": "Xuda AI Module",
5
5
  "main": "index.mjs",
6
6
  "type": "module",