-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call fails when contact does not exists #93
Comments
+1 |
Old trick of
|
What would be the expected behavior? |
This worked for me... In hubspot-php\src\Resources\Contacts.php, Line number 276 disable the http errors by replacing the line with this
|
Hi everyone $hubspot = Factory::createWithOAuth2Token(
'token',
null,
['http_errors' => false]
);
$response = $hubspot->contacts()->getByEmail("test@hubspot.com"); response
|
e.g.
$contact = $hubspot->contacts()->getByEmail("test@hubspot.com");
returns an error
PHP Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error:
GET https://api.hubapi.com/contacts/v1/contact/email/test@hubspot.com/profile?hapikey=APIKEYNOTSHOWNHERE
resulted in a404 Not Found
response:Digging a bit in the source of my trouble and I think that having the ability to turn off 'http_errors' on $hubspot->contacts()->getByEmail would solve my problem but I don;t know if it is doable or an option
The text was updated successfully, but these errors were encountered: