Skip to content

Refactors exception flow, adds integration tests, adds API version constant and contacts resource#140

Merged
sdiakovskyi-gd merged 6 commits into
masterfrom
refactor-exceptions
Nov 2, 2020
Merged

Refactors exception flow, adds integration tests, adds API version constant and contacts resource#140
sdiakovskyi-gd merged 6 commits into
masterfrom
refactor-exceptions

Conversation

@sdiakovskyi-gd
Copy link
Copy Markdown
Collaborator

The logic involves now all unsuccessful responses from the MJ server will throw an exception

  • all exceptions now inherit MailjetException to be able to catch them more accurate

  • fixes throwing IOExceptions from the HTTP client layer - now they wrapped up in MailjetClientCommunicationException

  • if an exception caused by the HTTP layer, MailjetClientCommunicationException is thrown

  • if an exception caused by the MailJet server, MailjetServerException is thrown

  • if an exception caused by an incorrectly formed request (like, invalid ID is passed and HTTP 404 is returned), MailjetClientRequestException is thrown

    • Exception - Send API v3.1, where HTTP 400 can indicate partial successess
  • Added integration tests to cover some flows

  • Added ApiVersion constant

  • Added contacts resource

…ons now inherits MailjetException; closes #121; closes #133; Adds API version constant; Adds integration tests to verify some flows
@sdiakovskyi-gd sdiakovskyi-gd merged commit 5fdec2c into master Nov 2, 2020
@sdiakovskyi-gd sdiakovskyi-gd deleted the refactor-exceptions branch November 2, 2020 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants