Apply owner stack to timeout error

parent bbeb8bc8
...@@ -38,6 +38,7 @@ import { ...@@ -38,6 +38,7 @@ import {
} from '../app-render/work-unit-async-storage.external' } from '../app-render/work-unit-async-storage.external'
import { import {
applyOwnerStack,
getRuntimeStage, getRuntimeStage,
makeDevtoolsIOAwarePromise, makeDevtoolsIOAwarePromise,
makeHangingPromise, makeHangingPromise,
...@@ -1349,6 +1350,7 @@ export async function cache( ...@@ -1349,6 +1350,7 @@ export async function cache(
const timeoutError = new UseCacheTimeoutError() const timeoutError = new UseCacheTimeoutError()
Error.captureStackTrace(timeoutError, cache) Error.captureStackTrace(timeoutError, cache)
applyOwnerStack(timeoutError)
const wrapAsInvalidDynamicUsageError = ( const wrapAsInvalidDynamicUsageError = (
error: Error, error: Error,
......
...@@ -33,7 +33,7 @@ describe('use-cache-hanging', () => { ...@@ -33,7 +33,7 @@ describe('use-cache-hanging', () => {
"stack": [ "stack": [
"getCachedData app/static/page.tsx (6:1)", "getCachedData app/static/page.tsx (6:1)",
"Cached app/static/page.tsx (18:24)", "Cached app/static/page.tsx (18:24)",
"stringify <anonymous>", "Page app/static/page.tsx (32:10)",
], ],
} }
`) `)
...@@ -62,6 +62,7 @@ describe('use-cache-hanging', () => { ...@@ -62,6 +62,7 @@ describe('use-cache-hanging', () => {
"stack": [ "stack": [
"getCachedData app/runtime/page.tsx (8:1)", "getCachedData app/runtime/page.tsx (8:1)",
"Cached app/runtime/page.tsx (20:24)", "Cached app/runtime/page.tsx (20:24)",
"Page app/runtime/page.tsx (42:7)",
], ],
} }
`) `)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment