Add retry on HTTP 500 errors