Skip to content

Get contact with a non existent email gives me 404 error #500

@CarlosBlackSmith

Description

@CarlosBlackSmith

HI I'm trying to implement this $contact = $hubSpot->crm()->contacts()->basicApi()->getById('nonexistent@email.com', null, null, null, false, 'email');
which works ok if the email exists but if an email doesn't exists then it gives 404 error and doesn't let me catch it for error handling

Fatal error: Uncaught HubSpot\Client\Crm\Contacts\ApiException: [404] Client error: GET https://api.hubapi.com/crm/v3/objects/contacts/nonexistent%40email.com?archived=false&idProperty=email resulted in a 404 Not Found response

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