mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
* Fix #3900 return 404 on asset hash mismatch in prod * Make INVALID_BUILD_ID return 404
This commit is contained in:
parent
b43af823dd
commit
9ec81c00fa
|
@ -127,7 +127,7 @@ export async function renderScriptError (req, res, page, error) {
|
|||
// Asks CDNs and others to not to cache the errored page
|
||||
res.setHeader('Cache-Control', 'no-store, must-revalidate')
|
||||
|
||||
if (error.code === 'ENOENT') {
|
||||
if (error.code === 'ENOENT' || error.message === 'INVALID_BUILD_ID') {
|
||||
res.statusCode = 404
|
||||
res.end('404 - Not Found')
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue