-
Couldn't load subscription status.
- Fork 276
Description
Describe the Bug
The fetch method on the NativeFetcher class does not return the claimed response object:
NativeDataFetcherResponse<T> { status: number statusText: string data: T headers?: HeadersInit }
Instead it returns something like this where the request data is nested under Symbols:
{ data: { sitecore: { context: [Object], route: [Object] } }, [Symbol(state)]: { aborted: false, rangeRequested: false, timingAllowPassed: true, requestIncludesCredentials: true, type: 'default', status: 200, timingInfo: { startTime: 22155.710625, redirectStartTime: 0, redirectEndTime: 0, postRedirectStartTime: 22155.710625, finalServiceWorkerStartTime: 0, finalNetworkResponseStartTime: 22237.364583, finalNetworkRequestStartTime: 22155.976292, endTime: 0, encodedBodySize: 14558, decodedBodySize: 72786, finalConnectionTimingInfo: [Object] }, cacheState: '', statusText: 'OK', headersList: HeadersList { cookies: [Array], [Symbol(headers map)]: [Map], [Symbol(headers map sorted)]: [Array] }, urlList: [ URL {} ], body: { stream: [ReadableStream], source: null, length: null } }, [Symbol(headers)]: Headers {} }
To Reproduce
Do a request with the fetch method on the Native fetch class, look at the response.
Expected Behavior
It should return the data the interface says it will.
Possible Fix
No response
Provide environment information
- Sitecore Version: 10.4x
- JSS Version: 22.4.1
- Browser Name and version: Happens serverside.
- Operating System and version (desktop or mobile):
- Link to your project (if available):