Improve failed to fetch RSC error (#56517)

Ensures the specific URL that failed is highlighted in this error. Useful for debugging when the fetch fails.
This commit is contained in:
Tim Neutkens 2023-10-06 16:14:40 +02:00 committed by GitHub
parent 5aca71cfa6
commit 61122ebc40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,7 +145,7 @@ export async function fetchServerResponse(
return [flightData, canonicalUrl]
} catch (err) {
console.error(
'Failed to fetch RSC payload. Falling back to browser navigation.',
`Failed to fetch RSC payload for ${url}. Falling back to browser navigation.`,
err
)
// If fetch fails handle it like a mpa navigation