You're right, HTTP 4xx status codes are not appropriate for errors that are not caused by the client.
You should return an HTTP 5xx status code. Either "502 Bad Gateway" or "503 Service Unavailable" seems appropriate to me, depending on whether service A just acts as a proxy for service B.
If you don't want to disclose a specific reason, you can also return "500 Internal Server Error".