Skip to content

Conversation

@Justintime50
Copy link
Member

@Justintime50 Justintime50 commented Dec 13, 2022

Description

Overhauls Exceptions by adding ~2 dozen new exception types. Exceptions from our API will extend ApiException (previously EasyPostException) and errors originating directly from the library now extend EasyPostException which extends \Exception.

I will add the CHANGELOG for these in the next PR which is to package up the release candidate.

Closes #7

Testing

Updates various test assertions to assure the right tests are being raised.

Pull Request Type

Please select the option(s) that are relevant to this PR.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement (fixing a typo, updating readme, renaming a variable name, etc)

fix:ecode to code

chore: first batch of errors migrated

fix: exception inheritence and locations

feat: import all exceptions

feat: convert remainder of errors

fix: tests relating to errors

fix: lint

feat: use remaining error types depending on status code

fix: throws docblock comments

fix: last minute things
@Justintime50 Justintime50 marked this pull request as ready for review December 13, 2022 21:04
@Justintime50 Justintime50 requested a review from a team December 13, 2022 21:04
Copy link
Contributor

@jchen293 jchen293 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@Justintime50 Justintime50 merged commit 21eba2f into master Dec 14, 2022
@Justintime50 Justintime50 deleted the exception_overhaul branch December 14, 2022 23:31
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.

A single exception type is not enough

4 participants