Unverified Commit e35c6534 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Eliminate 404s from internal requests (#12871)

parent aef282ff
...@@ -52,7 +52,7 @@ export function getOriginalStackFrame( ...@@ -52,7 +52,7 @@ export function getOriginalStackFrame(
.finally(() => { .finally(() => {
clearTimeout(tm) clearTimeout(tm)
}) })
if (!res.ok) { if (!res.ok || res.status === 204) {
return Promise.reject(new Error(await res.text())) return Promise.reject(new Error(await res.text()))
} }
......
...@@ -100,8 +100,8 @@ function getOverlayMiddleware(options: OverlayMiddlewareOptions) { ...@@ -100,8 +100,8 @@ function getOverlayMiddleware(options: OverlayMiddlewareOptions) {
} }
if (source == null) { if (source == null) {
res.statusCode = 404 res.statusCode = 204
res.write('Not Found') res.write('No Content')
return res.end() return res.end()
} }
...@@ -130,8 +130,8 @@ function getOverlayMiddleware(options: OverlayMiddlewareOptions) { ...@@ -130,8 +130,8 @@ function getOverlayMiddleware(options: OverlayMiddlewareOptions) {
} }
if (pos.source == null) { if (pos.source == null) {
res.statusCode = 404 res.statusCode = 204
res.write('Not Found') res.write('No Content')
return res.end() return res.end()
} }
...@@ -188,8 +188,8 @@ function getOverlayMiddleware(options: OverlayMiddlewareOptions) { ...@@ -188,8 +188,8 @@ function getOverlayMiddleware(options: OverlayMiddlewareOptions) {
() => false () => false
) )
if (!fileExists) { if (!fileExists) {
res.statusCode = 404 res.statusCode = 204
res.write('Not Found') res.write('No Content')
return res.end() return res.end()
} }
......
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