smartcar / java-sdk

Java client SDK for the Smartcar API.
https://smartcar.github.io/java-sdk
MIT License
20 stars 20 forks source link

feat(SmartcarExecption): retryAfter #129

Closed nbry closed 1 year ago

nbry commented 1 year ago

This PR adds a check in SmartcarException. If the error response has the header retry-after, the int value will be attached as a field named retryAfter to the SmartcarException instance.

Probably best reviewing commit-by-commit

Asana: https://app.asana.com/0/1204293750502842/1204284450390234

codecov[bot] commented 1 year ago

Codecov Report

Merging #129 (f8b94d7) into master (248fe24) will increase coverage by 0.21%. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/smartcar/java-sdk/pull/129/graphs/tree.svg?width=650&height=150&src=pr&token=nZAITx7w3X&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smartcar)](https://codecov.io/gh/smartcar/java-sdk/pull/129?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smartcar) ```diff @@ Coverage Diff @@ ## master #129 +/- ## ============================================ + Coverage 78.14% 78.35% +0.21% - Complexity 203 205 +2 ============================================ Files 37 37 Lines 819 827 +8 Branches 57 58 +1 ============================================ + Hits 640 648 +8 Misses 147 147 Partials 32 32 ``` | Flag | Coverage Δ | | |---|---|---| | integration | `65.29% <25.00%> (-0.03%)` | :arrow_down: | | test | `51.26% <100.00%> (+0.47%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smartcar#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/smartcar/java-sdk/pull/129?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smartcar) | Coverage Δ | | |---|---|---| | [.../main/java/com/smartcar/sdk/SmartcarException.java](https://codecov.io/gh/smartcar/java-sdk/pull/129?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smartcar#diff-c3JjL21haW4vamF2YS9jb20vc21hcnRjYXIvc2RrL1NtYXJ0Y2FyRXhjZXB0aW9uLmphdmE=) | `86.23% <100.00%> (+0.84%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://codecov.io/gh/smartcar/java-sdk/pull/129?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smartcar). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smartcar) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/smartcar/java-sdk/pull/129?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smartcar). Last update [c8fcb3f...f8b94d7](https://codecov.io/gh/smartcar/java-sdk/pull/129?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smartcar). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=smartcar).