Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(retrofit/test): simplify the code by replacing RetrofitException.httpError with SpinnakerHttpException #1079

Merged

Conversation

SheetalAtre
Copy link
Contributor

@SheetalAtre SheetalAtre commented Jul 18, 2023

refactor(retrofit/test): simplify the code by replacing RetrofitException.httpError with SpinnakerHttpException

and removing RetrofitException

this.retrofit2Response = syncResp;
this.response = null;
this.retrofit = retrofit;
responseBody = this.getErrorBodyAs();
Copy link
Contributor

Choose a reason for hiding this comment

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

This may belong in a followup PR, but...if we can't parse the response body as json to build a map, we'd eventually like the exception message to include some part of the response. I think that means we need a function like processResponse that sets responseBody and either rawMessage or the "plain" message field in this exceptional case.

@SheetalAtre SheetalAtre force-pushed the retrofitException_createHttpException branch from 00d7d58 to 63ffe23 Compare July 19, 2023 08:19
@SheetalAtre SheetalAtre force-pushed the retrofitException_createHttpException branch from 211f0c9 to d189f3d Compare July 20, 2023 10:02
@SheetalAtre SheetalAtre force-pushed the retrofitException_createHttpException branch from d189f3d to 95e8075 Compare July 27, 2023 13:14
@SheetalAtre SheetalAtre force-pushed the retrofitException_createHttpException branch 4 times, most recently from 00fc79f to b4d1b59 Compare August 11, 2023 04:23
@SheetalAtre SheetalAtre force-pushed the retrofitException_createHttpException branch 5 times, most recently from 3ae55e5 to a2a0b9d Compare August 21, 2023 13:58
@SheetalAtre SheetalAtre force-pushed the retrofitException_createHttpException branch from a2a0b9d to ba4c5e9 Compare August 22, 2023 05:14
@SheetalAtre SheetalAtre reopened this Aug 22, 2023
@SheetalAtre SheetalAtre force-pushed the retrofitException_createHttpException branch from befd121 to ba4c5e9 Compare August 22, 2023 18:05
@SheetalAtre SheetalAtre reopened this Aug 22, 2023
@SheetalAtre SheetalAtre changed the title refactor(retrofit): remove use of RetrofitException.httpError to create SpinnakerHttpException refactor(retrofit/test): simplify the code by replacing RetrofitException.httpError with SpinnakerHttpException Aug 22, 2023
@SheetalAtre SheetalAtre force-pushed the retrofitException_createHttpException branch from 8e9f599 to ba4c5e9 Compare August 22, 2023 18:29
@SheetalAtre SheetalAtre reopened this Aug 22, 2023
@SheetalAtre SheetalAtre force-pushed the retrofitException_createHttpException branch from a76d050 to ba4c5e9 Compare August 23, 2023 16:48
@SheetalAtre SheetalAtre reopened this Aug 23, 2023
@SheetalAtre SheetalAtre force-pushed the retrofitException_createHttpException branch from bfc2b63 to d5a91bf Compare August 23, 2023 17:35
@dbyron-sf dbyron-sf force-pushed the retrofitException_createHttpException branch from d5a91bf to 1c45e6f Compare August 23, 2023 17:50
and pass it a Retrofit object so we no longer need a Retrofit member
… in SpinnakerHttpException

since most members and methods are nullable
@dbyron-sf dbyron-sf marked this pull request as ready for review August 24, 2023 15:19
@dbyron-sf dbyron-sf added the ready to merge Approved and ready for merge label Aug 24, 2023
@mergify mergify bot added the auto merged label Aug 24, 2023
@mergify mergify bot merged commit 2b725cf into spinnaker:master Aug 24, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants