@tomradex/domain 0.2.16 → 0.2.19
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/errors.js +2 -1
- package/package.json +1 -1
package/dist/errors.js
CHANGED
|
@@ -122,7 +122,8 @@ export function modelErrorKind(message) {
|
|
|
122
122
|
return "model";
|
|
123
123
|
if (/\b5\d\d\b|overloaded|bad gateway|service unavailable/i.test(message))
|
|
124
124
|
return "server";
|
|
125
|
-
|
|
125
|
+
// "Connection error." is how the OpenAI and Anthropic SDKs — the built-in pi's — say the service was not reached.
|
|
126
|
+
if (/fetch failed|ECONNREFUSED|ECONNRESET|ENOTFOUND|EAI_AGAIN|ETIMEDOUT|network|connection error|timed? ?out|socket hang up|certificate/i.test(message))
|
|
126
127
|
return "network";
|
|
127
128
|
return "other";
|
|
128
129
|
}
|