client: return timeout error for gateway timeout

So discovery could trigger its retry logic for gateway timeout too.