@salesforce/lds-network-fetch 1.463.0 → 1.465.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.
@@ -850,7 +850,15 @@ async function handleSendFetchRequest(resourceRequest, resourceRequestContext, i
850
850
  // the intial then here can also most likely be moved to a response interceptor as well
851
851
  interceptedResponse
852
852
  .then((value) => {
853
- if (storageAndLogger !== null && storageAndLogger.storage !== null) {
853
+ // Only persist successful responses. fetchNetworkAdapter resolves (does not reject)
854
+ // for 4xx/5xx and returns null/text bodies for 204/non-JSON, and a durable cache hit
855
+ // is replayed as a synthetic 200 (see createOkResponse above), so caching a failure
856
+ // body would later be ingested as a successful response.
857
+ if (storageAndLogger !== null &&
858
+ storageAndLogger.storage !== null &&
859
+ value.ok !== false &&
860
+ value.body !== null &&
861
+ value.body !== undefined) {
854
862
  storageAndLogger.storage.set(transactionKey, value.body).catch((_error) => { });
855
863
  }
856
864
  internalRequestLogger.resolve(resourceRequest, value);
@@ -1252,4 +1260,4 @@ function readUiApiErrorCode(response) {
1252
1260
  }
1253
1261
 
1254
1262
  export { UIAPI_PRIVATE_PATHS, UIAPI_PUBLIC_PATHS, compilePathMatchers, getFetchMethod, instrument, isIdempotentWrite, isMutatingMethod, isRetryableMethod, isRetryableOperationType, isRetryableReadPost, parseRetryAfterMs, readUiApiErrorCode, setupFetchNetworkAdapter, setupLexNetworkAdapter };
1255
- // version: 1.463.0-ea9ecd17fc
1263
+ // version: 1.465.0-91ef58ca05
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-network-fetch",
3
- "version": "1.463.0",
3
+ "version": "1.465.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS Network Adapter using fetch",
6
6
  "main": "dist/ldsNetworkFetch.js",
@@ -34,12 +34,12 @@
34
34
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-network-fetch"
35
35
  },
36
36
  "dependencies": {
37
- "@conduit-client/service-fetch-network": "3.30.0",
37
+ "@conduit-client/service-fetch-network": "3.32.1",
38
38
  "@luvio/engine": "0.161.2",
39
39
  "@luvio/network-adapter-fetch": "0.161.2"
40
40
  },
41
41
  "devDependencies": {
42
- "@salesforce/lds-network-aura": "^1.463.0"
42
+ "@salesforce/lds-network-aura": "^1.465.0"
43
43
  },
44
44
  "volta": {
45
45
  "extends": "../../package.json"