Fix discover endpoint
Refactor request proxy error handling