@zimic/interceptor 1.2.3-canary.0 → 1.2.3-canary.2

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.
@@ -1718,9 +1718,14 @@ function createInterceptorServer(options = {}) {
1718
1718
  /* istanbul ignore else -- @preserve
1719
1719
  * This is always true during tests because we force max-age=0 to disable CORS caching. */
1720
1720
  /* istanbul ignore next -- @preserve
1721
- * This try..catch is for the case when the remote interceptor web socket client is closed before responding.
1722
- * Since simulating this scenario is difficult, we are ignoring this branch fow now. */
1721
+ *
1722
+ * If the socket is closed before receiving a response, the message is aborted with an error. This can happen if
1723
+ * we send a request message and the interceptor worker closes the socket before sending a response. In this
1724
+ * case, we can safely ignore the error because we know that the worker is shutting down and won't handle
1725
+ * any more requests.
1726
+ *
1727
+ * Due to the rare nature of this edge case, we can't reliably reproduce it in tests. */
1723
1728
 
1724
1729
  export { DEFAULT_ACCESS_CONTROL_HEADERS, DEFAULT_INTERCEPTOR_TOKENS_DIRECTORY, DEFAULT_PREFLIGHT_STATUS_CODE, NotRunningInterceptorServerError_default, RunningInterceptorServerError_default, createCachedDynamicImport_default, createInterceptorServer, createInterceptorToken, listInterceptorTokens, logger, readInterceptorTokenFromFile, removeInterceptorToken };
1725
- //# sourceMappingURL=chunk-ZPZDEDJI.mjs.map
1726
- //# sourceMappingURL=chunk-ZPZDEDJI.mjs.map
1730
+ //# sourceMappingURL=chunk-XCYZ5L2M.mjs.map
1731
+ //# sourceMappingURL=chunk-XCYZ5L2M.mjs.map