Commit 9ec81c00 authored by Tim Teeling's avatar Tim Teeling Committed by Tim Neutkens

Fix #3900 return 404 on asset hash mismatch in prod (#3941)

* Fix #3900 return 404 on asset hash mismatch in prod

* Make INVALID_BUILD_ID return 404
parent b43af823
...@@ -127,7 +127,7 @@ export async function renderScriptError (req, res, page, error) { ...@@ -127,7 +127,7 @@ export async function renderScriptError (req, res, page, error) {
// Asks CDNs and others to not to cache the errored page // Asks CDNs and others to not to cache the errored page
res.setHeader('Cache-Control', 'no-store, must-revalidate') 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.statusCode = 404
res.end('404 - Not Found') res.end('404 - Not Found')
return return
......
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