@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.
@@ -1749,8 +1749,13 @@ function createInterceptorServer(options = {}) {
1749
1749
  /* istanbul ignore else -- @preserve
1750
1750
  * This is always true during tests because we force max-age=0 to disable CORS caching. */
1751
1751
  /* istanbul ignore next -- @preserve
1752
- * This try..catch is for the case when the remote interceptor web socket client is closed before responding.
1753
- * Since simulating this scenario is difficult, we are ignoring this branch fow now. */
1752
+ *
1753
+ * If the socket is closed before receiving a response, the message is aborted with an error. This can happen if
1754
+ * we send a request message and the interceptor worker closes the socket before sending a response. In this
1755
+ * case, we can safely ignore the error because we know that the worker is shutting down and won't handle
1756
+ * any more requests.
1757
+ *
1758
+ * Due to the rare nature of this edge case, we can't reliably reproduce it in tests. */
1754
1759
 
1755
1760
  exports.DEFAULT_ACCESS_CONTROL_HEADERS = DEFAULT_ACCESS_CONTROL_HEADERS;
1756
1761
  exports.DEFAULT_INTERCEPTOR_TOKENS_DIRECTORY = DEFAULT_INTERCEPTOR_TOKENS_DIRECTORY;
@@ -1764,5 +1769,5 @@ exports.listInterceptorTokens = listInterceptorTokens;
1764
1769
  exports.logger = logger;
1765
1770
  exports.readInterceptorTokenFromFile = readInterceptorTokenFromFile;
1766
1771
  exports.removeInterceptorToken = removeInterceptorToken;
1767
- //# sourceMappingURL=chunk-EMX4G67A.js.map
1768
- //# sourceMappingURL=chunk-EMX4G67A.js.map
1772
+ //# sourceMappingURL=chunk-ZU6IGW27.js.map
1773
+ //# sourceMappingURL=chunk-ZU6IGW27.js.map