asciisd / zoho-v3

Laravel Zoho API V3 Package
MIT License
16 stars 17 forks source link

Catch ApiExceptions in ManagesRecords Class #25

Open papoms opened 11 months ago

papoms commented 11 months ago

I've been looking into an issue with the API but did not find any issues in the log (neither the SDK Log nor the Laravel log). I specifically was looking into authentication issues not being logged when retrieving records like so:

 $manager = ZohoManager::make('Deals');
 $record =  $manager->getRecord($id);

To reproduce:

For me it boils down to this line

Suggested Fix use com\zoho\crm\api\modules\APIException; should be use com\zoho\crm\api\record\APIException;

Or is there a specific reason to use modules i am missing?

papoms commented 11 months ago

Happy to provide a PR. Or do we need to catch both types of Exceptions here?

papoms commented 11 months ago

This is what i am trying out now: https://github.com/papoms/zoho-v3/pull/3/commits/5bc41c9a93520b7de801eda041a9c89a168ed68c