HTTP Errors that are reported as Error 500
trieloff opened this issue · 2 comments
trieloff commented
Some errors seen in the logs #158 (comment) that look misreported:
{ statusCode: 500,
headers:
{ 'Content-Type': 'text/html',
'X-Static': 'Raw/Static',
'Cache-Control': 'max-age=300' },
body:
'Error: getaddrinfo EAI_AGAIN raw.githubusercontent.com raw.githubusercontent.com:443' }
should be 502
{ statusCode: 500,
headers:
{ 'Content-Type': 'text/html',
'X-Static': 'Raw/Static',
'Cache-Control': 'max-age=300' },
body:
'Error: Client network socket disconnected before secure TLS connection was established' }
should be 502
{ statusCode: 500,
headers:
{ 'Content-Type': 'text/html',
'X-Static': 'Raw/Static',
'Cache-Control': 'max-age=300' },
body: 'Error: connect ECONNREFUSED 151.101.112.133:443' }
should be 502
{ statusCode: 500,
headers:
{ 'Content-Type': 'text/html',
'X-Static': 'Raw/Static',
'Cache-Control': 'max-age=300' },
body: 'Error: socket hang up' }
should be 502
Btw: what I haven't seen once are rate limits from GitHub/Fastly, if you don't count the limit of open connections.
kptdobe commented
With recent GitHub outage, this is more than valid, we had plenty of 500 which should have been something else.
trieloff commented
I wonder if we should switch from request to helix-fetch
and address these issues together. With the switch, which will happen eventually, I expect the error codes to change again.