@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.
Files changed (2) hide show
  1. package/dist/errors.js +2 -1
  2. 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
- if (/fetch failed|ECONNREFUSED|ECONNRESET|ENOTFOUND|EAI_AGAIN|ETIMEDOUT|network|timed? ?out|socket hang up|certificate/i.test(message))
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomradex/domain",
3
- "version": "0.2.16",
3
+ "version": "0.2.19",
4
4
  "type": "module",
5
5
  "author": "Haoyuan Tang",
6
6
  "engines": {