-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(retrofit/test): simplify the code by replacing RetrofitExcep…
…tion.httpError with SpinnakerHttpException (#1079) * test(retrofit): demonstrate behavior of SpinnakerHttpException built from a RetrofitError * refactor(retrofit): RetrofitException.getErrorBodyAs() returns a Map to allow to set custom properties in error response body * refactor(retrofit): move getErrorBodyAs() in SpinnakerHttpException to remove RetrofitException class later * refactor(retrofit): remove type parameter from getErrorBodyAs() since it will always be of type Map * refactor(retrofit): move retryable condition to SpinnakerHttpException to remove createSpinnakerHttpException() later * refactor(retrofit): remove createSpinnakerHttpException() to remove RetrofitException.httpError() later * refactor(retrofit/test): remove reference to RetrofitException class in all files to simplify code * refactor(retrofit): make retrofit as final for readability * refactor(retrofit/test): delete RetrofitException class and tests to simplify code * refactor(retrofit): changes to process different responses at runtime * refactor(retrofit): make SpinnakerHttpException.getErrorBodyAs private and pass it a Retrofit object so we no longer need a Retrofit member * refactor(retrofit): replace @NonnullByDefault with @NullableByDefault in SpinnakerHttpException since most members and methods are nullable * refactor(retrofit): remove unnecessary final from SpinnakerHttpException.getRawMessage declaration --------- Co-authored-by: David Byron <[email protected]>
- Loading branch information
1 parent
ba4c5e9
commit 2b725cf
Showing
6 changed files
with
83 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 0 additions & 82 deletions
82
...rofit/src/main/java/com/netflix/spinnaker/kork/retrofit/exceptions/RetrofitException.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 0 additions & 60 deletions
60
...t/src/test/java/com/netflix/spinnaker/kork/retrofit/exceptions/RetrofitExceptionTest.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters