-
The following code will fail : const { createProxyMiddleware } = require('http-proxy-middleware');
require('express')().use(
'/',
createProxyMiddleware({
target: 'http://failhtis/'
})
).listen(3000); This will display this in my browser : And in my console :
What I would love to do is generate a custom message / html for the error. How do I manage that? I've tried the To sum up: I know error will happen in my setup, how do I send a custom answer instead of the "Error occured while proxying..." message? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I just found the answer to my question, I wasn't looking into the doc of the correct version. Here it is for v2
|
Beta Was this translation helpful? Give feedback.
I just found the answer to my question, I wasn't looking into the doc of the correct version.
Here it is for v2