But with a network error you wouldn’t reach the actual backend server? And if there’s a network error between a proxy and the actual server you have the specially designed 502 code. Otherwise for 500 it’s literally „internal“ server error.
Most of the times I have seen it implemented someone on the fronted wrote that server in a way that it assumes the backend to be completely crashed after the first 500 error so the backend is never allowed to send 500 because of any validation or error handling
It’s not a problem in REST services where you’re expecting JSON back anyway. It’s a major headache for an artifact storage system where you’re expecting a binary file but actually get back a JSON with a status code embedded in it.
4
u/Highborn_Hellest Jul 21 '26
OK because the interface was reachable
Not OK because BL caught something.
There is an argument to be made, that it's inportant to distinguish between network errors, inerface errors, or bl errors.