@getanyapi/sdk 0.9.6 → 0.9.7

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
@@ -887,8 +887,12 @@ var AnyAPI = class {
887
887
  };
888
888
 
889
889
  // src/core/types.ts
890
+ var OUTPUT_NOT_RETAINED = "the run output was not retained: this response is an idempotent replay whose stored payload has expired or was too large to store, so only the run metadata came back. Re-run the request without the idempotency key (or with a fresh one) to fetch the data again.";
890
891
  function unwrap(result) {
891
892
  const output = result.output;
893
+ if (output === null || output === void 0) {
894
+ throw new AnyAPIError(OUTPUT_NOT_RETAINED, 200);
895
+ }
892
896
  if (output !== null && typeof output === "object" && "found" in output) {
893
897
  const env = output;
894
898
  if (env.found) {