@gammatech/aijsx 0.11.1-dev.2024-06-23 → 0.11.2-dev.2024-06-25
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.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2414,7 +2414,7 @@ var RE_INTERNAL_SERVER_MESSASGE = /The system encountered an unexpected error du
|
|
|
2414
2414
|
var RE_RATE_LIMIT_MESSAGE = /Too many requests, please wait before trying again/;
|
|
2415
2415
|
var extractStatusFromError2 = (error) => {
|
|
2416
2416
|
if (typeof error !== "object" || !(error instanceof Error)) {
|
|
2417
|
-
return;
|
|
2417
|
+
return 500;
|
|
2418
2418
|
}
|
|
2419
2419
|
if (error instanceof import_sdk.default.APIError && typeof error.status === "number") {
|
|
2420
2420
|
return error.status;
|
|
@@ -2435,7 +2435,7 @@ var extractStatusFromError2 = (error) => {
|
|
|
2435
2435
|
if (RE_RATE_LIMIT_MESSAGE.test(error.message)) {
|
|
2436
2436
|
return 429;
|
|
2437
2437
|
}
|
|
2438
|
-
return
|
|
2438
|
+
return 500;
|
|
2439
2439
|
};
|
|
2440
2440
|
function AnthropicChatCompletion(props, ctx) {
|
|
2441
2441
|
const defaultMaxRetries = ctx.getContext(DefaultMaxRetriesContext);
|
package/dist/index.mjs
CHANGED
|
@@ -2311,7 +2311,7 @@ var RE_INTERNAL_SERVER_MESSASGE = /The system encountered an unexpected error du
|
|
|
2311
2311
|
var RE_RATE_LIMIT_MESSAGE = /Too many requests, please wait before trying again/;
|
|
2312
2312
|
var extractStatusFromError2 = (error) => {
|
|
2313
2313
|
if (typeof error !== "object" || !(error instanceof Error)) {
|
|
2314
|
-
return;
|
|
2314
|
+
return 500;
|
|
2315
2315
|
}
|
|
2316
2316
|
if (error instanceof AnthropicClient.APIError && typeof error.status === "number") {
|
|
2317
2317
|
return error.status;
|
|
@@ -2332,7 +2332,7 @@ var extractStatusFromError2 = (error) => {
|
|
|
2332
2332
|
if (RE_RATE_LIMIT_MESSAGE.test(error.message)) {
|
|
2333
2333
|
return 429;
|
|
2334
2334
|
}
|
|
2335
|
-
return
|
|
2335
|
+
return 500;
|
|
2336
2336
|
};
|
|
2337
2337
|
function AnthropicChatCompletion(props, ctx) {
|
|
2338
2338
|
const defaultMaxRetries = ctx.getContext(DefaultMaxRetriesContext);
|