This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502