zendesk / zendesk_api_client_php

Official Zendesk API v2 client library for PHP
336 stars 259 forks source link

Closed ticket update without custom exception handling #427

Closed henriqueweiand closed 4 months ago

henriqueweiand commented 5 years ago

I have an integration that sends updates to a zendesk tiket if there is an update on my side (client), but on my side I am not aware when the ticket is closed or not, which ends up generating an error in my sentry when having to perform an update on the closed ticket, see

My code for example today is as follows:

try {
            $this->client->tickets()->update($ticketId, [
                'comment' => [
                    'html_body' => $comment,
                    'public' => false
                ]
            ]);
        } catch (ClientException $exception) {
                        throw $exception;
        }

However this exception does not happen and I can not handle the errors because in the put method of the library, there is another excption, for the case of the closed ticket

Screen Shot 2019-08-20 at 10 13 31

Sentry

Screen Shot 2019-08-20 at 10 14 54

How can I make sure that I don't fall for this exception and / or I can handle it my way?

ecoologic commented 5 months ago

Hi,

thank you for your request, are you still interested in a solution for this issue?

ecoologic commented 4 months ago

Closing due to inactivity. Re-open if needed.