Maven dependency proxy: handle gracefully a connection refused on the remote registry
🔥 Problem
Connection to the remote registry could be refused.
Currently this will end in a 500
situation in the rails side with:
Errno::ECONNREFUSED Failed to open TCP connection to XXXX (Connection refused - connect(2) for "XXXX" port XXXX)
🚒 Solution
- Detect and gracefully handle this situation.
- Return a coherent status code (and not
500
).