Exceptions from API may be changing and need dynamic handling
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3383761. -->
Reported by: [jurgenhaas](https://www.drupal.org/user/168924)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>In <code>\Drupal\helpdesk_zendesk\Plugin\HelpdeskIntegration\Zendesk::resolveIssue</code> we currently read the exception description like this:</p>
<div class="codeblock">
<pre><span style="color: #000000"><span style="color: #0000BB"><?php<br> </span><span style="color: #007700">if (</span><span style="color: #0000BB">$emailError </span><span style="color: #007700">= </span><span style="color: #0000BB">$errorDetails</span><span style="color: #007700">-></span><span style="color: #0000BB">details</span><span style="color: #007700">-></span><span style="color: #0000BB">base</span><span style="color: #007700">) {<br> </span><span style="color: #0000BB">$errorMessage </span><span style="color: #007700">= </span><span style="color: #0000BB">$emailError</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">]-></span><span style="color: #0000BB">description</span><span style="color: #007700">;<br> }<br></span><span style="color: #0000BB">?></span></span></pre></div>
<p>This is failing in a real case now where we don't get a <code>base</code> field in details. Instead, we get a <code>status</code> field there. I assume that similar variations are possible for other exceptions too.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Let's handle the exception details dynamically.</p>
issue