Skip to content

Catch ApiExceptions in ManagesRecords Class #25

@papoms

Description

@papoms

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:

  • edit storage/app/zoho/oauth/tokens/zcrm_oauthtokens.txt so the access_token is wrong and run the above code.
  • The Authentication will fail but ManagesRecords.php will not catch the error and log it.

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions