If you call a remote REST service, you perhaps want to retry automatically upon recoverable errors. Make sure to test that code - so that you won't end up surprised that it is completely broken, as I was :-) What follows is a few simple tips for simulating some common recoverable failures.
http://localhost:<port where nothing runs>
nc -lk 5432to listen but not respond and connect to "http://localhost:5432"
HTTP 5xx- use "https://httpbin.org/status/500" (or any other 5xx number)