Files
Jiachi LiuandGitHub b2e711aaea test: add dynamic routes and suspense test case for onRequestError (#67848)
### What

Add tests cases for dynamic routes and suspense page rendering case coverage for onRequestError.

Mostly for checking the `routePath` where we can display the proper original route path

Closes NDX-22
Closes NDX-79
2024-07-17 21:35:17 +02:00

14 lines
300 B
JavaScript

export function onRequestError(err, request, context) {
fetch(`http://localhost:${process.env.PORT}/write-log`, {
method: 'POST',
body: JSON.stringify({
message: err.message,
request,
context,
}),
headers: {
'Content-Type': 'application/json',
},
})
}