We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 387d1c7 commit 873ea92Copy full SHA for 873ea92
index.js
@@ -278,6 +278,7 @@ class ProxyErrorHandler {
278
this.req = null
279
this.proxyReq = null
280
this.errorHandler = null
281
+ this.hpeExpr = /HPE_INVALID/
282
283
this._release = this._release.bind(this)
284
this._handle = this._handle.bind(this)
@@ -294,7 +295,7 @@ class ProxyErrorHandler {
294
295
296
if (err.code === 'ECONNREFUSED' || err.code === 'ENOTFOUND') {
297
err.statusCode = 503
- } else if (/HPE_INVALID/.test(err.code)) {
298
+ } else if (this.hpeExpr.test(err.code)) {
299
err.statusCode = 502
300
} else if (err.code === 'ECONNRESET') {
301
if (!this.proxyReq.aborted) {
0 commit comments