ActiveCampaign / activecampaign-api-php

MIT License
115 stars 76 forks source link

Throw Exceptions for Request Errors #85

Closed bartboy011 closed 6 years ago

bartboy011 commented 6 years ago

This PR introduces threw new exception classes:

Each exception contains the appropriate error message (ie, cURL's error or the response error) as well as the returned status code as the exception's code (except for TimeoutException).

All three exceptions extend the RequestException class, which extends the base \Exception class.

Additionally, this PR adds a cURL connection timeout of 10 seconds.

cc: @mthommes @cristiangrama

bartboy011 commented 6 years ago

@ActiveCampaign/integration

bartboy011 commented 6 years ago

@mthommes Updated!

Edit: also @cristiangrama

bartboy011 commented 6 years ago

@cristiangrama Looks like you don't get assigned after approval on this repo yet

bartboy011 commented 6 years ago

Also, @mthommes to answer your question about the major version, yes, the next few PRs I'll be opening will all be part of v3