A request to the proxy without credentials throws a wrong exception
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3549340. -->
Reported by: [isholgueras](https://www.drupal.org/user/733162)
Related to !76
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When you request any resource through the proxy, for example <code>/conductor/proxy/v3/accounts</code> without any credentials configured or wrong credentials, there is an Exception thrown that does now identify the real issue:</p>
<pre>The website encountered an unexpected error. Try again later.<br><br>InvalidArgumentException: The HTTP status code "0" is not valid. in Symfony\Component\HttpFoundation\Response->setStatusCode() (line 475 of /var/www/html/vendor/symfony/http-foundation/Response.php).<br>Symfony\Component\HttpFoundation\Response->__construct() (Line: 41)<br>Symfony\Component\HttpFoundation\JsonResponse->__construct() (Line: 73)<br>Drupal\conductor\ConductorHttpApiClient->forward() (Line: 33)<br>Drupal\conductor\Controller\ConductorProxyController->proxy()<br>call_user_func_array() (Line: 123)</pre><h3 id="proposed-solution">Proposed solution</h3>
<p>Catch the exception and throw a proper <code>ConductorCredentialsNotFoundException</code> that will identify better what is the issue.</p>
issue