Problem/Motivation

When a site has invalid Conductor API credentials configured (e.g. wrong key or secret), any operation that calls ConductorHttpApiClient::getAccountId() results in a 500 error. The Drupal logs show:

Client error: `GET https://api.conductor.com/v3/accounts?apiKey=…&sig=…` resulted in a `404 Not Found` response

This happens because the Guzzle request in getAccountId() does not set 'http_errors' => FALSE. Guzzle throws a ClientException on any 4xx response. That exception propagates to callers as a 500 instead of being handled gracefully.

The forward() method in the same class already uses 'http_errors' => FALSE and checks the status code manually getAccountId() was inconsistent with that pattern.

Steps to reproduce

1. Install Conductor and configure it with an invalid API key and secret (e.g. test / test).
2. Trigger any action that calls getAccountId() (e.g. opening the Conductor sidebar in the Canvas editor).
3. Observe a 500 error for the /conductor/api/settings route. The Drupal log contains the raw Guzzle exception message.

Proposed resolution

Add 'http_errors' => FALSE to the Guzzle request in getAccountId() and check the response status code before parsing the body. Throw ConductorCredentialsNotFoundException on 4xx responses so callers handle it consistently with other credential errors.

Issue fork conductor-3586024

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

isholgueras created an issue. See original summary.

isholgueras’s picture

Issue summary: View changes
justafish’s picture

Status: Active » Needs work
justafish’s picture

Assigned: isholgueras » Unassigned
Status: Needs work » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.