Retrieve AutoProxyServer even when no BaseUrl is set

Improve Error Handling code style