SSR: Oh-Oh page
When server cannot reach the backend, SSR should render an Oh-oh problem contacting Genesys page.
At this moment, we're getting
This page isn’t working
192.168.99.100 didn’t send any data.
ERR_EMPTY_RESPONSE
while the Express knows that the request failed:
Incoming request, url: /proxy/oauth/token?grant_type=client_credentials
HTTP proxy to http://localhost:8080/oauth/token?grant_type=client_credentials&client_id=....&client_secret=....
Error: connect ECONNREFUSED 127.0.0.1:8080
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1161:14)
You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
Error: Request failed with status code 500
at e.exports (/var/www/genesys-catalog-ui/server/server.js:1:637418)
at e.exports (/var/www/genesys-catalog-ui/server/server.js:1:836077)
at IncomingMessage.<anonymous> (/var/www/genesys-catalog-ui/server/server.js:1:1942527)
at IncomingMessage.emit (events.js:187:15)
at IncomingMessage.EventEmitter.emit (domain.js:442:20)
at endReadableNT (_stream_readable.js:1085:12)
at args.(anonymous function) (/usr/local/lib/node_modules/pm2/node_modules/event-loop-inspector/index.js:133:29)
at process._tickCallback (internal/process/next_tick.js:63:19)
Error: connect ECONNREFUSED 127.0.0.1:8080
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1161:14)
Render a simple error-message page with HTTP status 503 Service Unavailable: The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.
The HTML template sent to the client in this case should be in server/503-unavailable.html
.