@signalwire/js 4.0.0-beta.5 → 4.0.0-beta.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.
@@ -16314,7 +16314,10 @@ var SignalWire = class extends Destroyable {
16314
16314
  throw new InvalidCredentialsError("Provided credentials have expired.");
16315
16315
  }
16316
16316
  if (_credentials.expiry_at && credentialProvider.refresh) {
16317
- const refreshFn = credentialProvider.refresh;
16317
+ const refreshFn = async () => {
16318
+ if (!credentialProvider.refresh) throw new InvalidCredentialsError("Credential provider does not support refresh");
16319
+ return credentialProvider.refresh();
16320
+ };
16318
16321
  const refreshInterval = Math.max(_credentials.expiry_at - Date.now() - 5e3, 1e3);
16319
16322
  this._refreshTimerId = setTimeout(async () => {
16320
16323
  try {