@runtypelabs/sdk 1.24.0 → 1.24.1

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.cjs CHANGED
@@ -1191,8 +1191,8 @@ var RuntypeFlowBuilder = class {
1191
1191
  try {
1192
1192
  return await client.dispatch(hashOnlyConfig);
1193
1193
  } catch (err) {
1194
- const message = err instanceof Error ? err.message : "";
1195
- if (!message.includes("422")) {
1194
+ const is422 = err != null && typeof err === "object" && "statusCode" in err && err.statusCode === 422 || err instanceof Error && /\b422\b/.test(err.message);
1195
+ if (!is422) {
1196
1196
  throw err;
1197
1197
  }
1198
1198
  }
package/dist/index.mjs CHANGED
@@ -1119,8 +1119,8 @@ var RuntypeFlowBuilder = class {
1119
1119
  try {
1120
1120
  return await client.dispatch(hashOnlyConfig);
1121
1121
  } catch (err) {
1122
- const message = err instanceof Error ? err.message : "";
1123
- if (!message.includes("422")) {
1122
+ const is422 = err != null && typeof err === "object" && "statusCode" in err && err.statusCode === 422 || err instanceof Error && /\b422\b/.test(err.message);
1123
+ if (!is422) {
1124
1124
  throw err;
1125
1125
  }
1126
1126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "1.24.0",
3
+ "version": "1.24.1",
4
4
  "type": "module",
5
5
  "description": "TypeScript SDK for the Runtype API with fluent methods. Use it to quickly realize AI products, agents, and workflows.",
6
6
  "main": "dist/index.cjs",