Exceptions from API may be changing and need dynamic handling

Created on 28 August 2023, about 1 year ago

Problem/Motivation

In \Drupal\helpdesk_zendesk\Plugin\HelpdeskIntegration\Zendesk::resolveIssue we currently read the exception description like this:

        if ($emailError = $errorDetails->details->base) {
          $errorMessage = $emailError[0]->description;
        }

This is failing in a real case now where we don't get a base field in details. Instead, we get a status field there. I assume that similar variations are possible for other exceptions too.

Proposed resolution

Let's handle the exception details dynamically.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany jurgenhaas Gottmadingen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024