Rescue 500 error for handling Case locations not found

make sure you note:

"In case remote server is slow to respond, error 500 could happen. This is to give a bit more time for server to respond"