@clickraft/cli 0.10.1 → 0.11.0

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 CHANGED
@@ -352,10 +352,10 @@ async function longPoll(opts) {
352
352
  try {
353
353
  result = await opts.fetcher({ signal: iterationSignal });
354
354
  } catch (err) {
355
- if (opts.signal?.aborted || now() - started >= opts.timeoutMs) {
355
+ if (iterationSignal.aborted) {
356
356
  throw new ApiError(
357
357
  "TIMEOUT",
358
- `Wait exceeded ${opts.timeoutMs}ms without reaching a terminal state.`,
358
+ opts.signal?.aborted ? "Wait was aborted." : `Wait exceeded ${opts.timeoutMs}ms without reaching a terminal state.`,
359
359
  { retryable: true }
360
360
  );
361
361
  }