-
Notifications
You must be signed in to change notification settings - Fork 172
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
feat(retrofit): add accessor to exception response body as a map #1074
feat(retrofit): add accessor to exception response body as a map #1074
Conversation
a2856c1
to
20d2bef
Compare
...fit/src/main/java/com/netflix/spinnaker/kork/retrofit/exceptions/SpinnakerHttpException.java
Outdated
Show resolved
Hide resolved
...fit/src/main/java/com/netflix/spinnaker/kork/retrofit/exceptions/SpinnakerHttpException.java
Show resolved
Hide resolved
...c/test/java/com/netflix/spinnaker/kork/retrofit/exceptions/SpinnakerServerExceptionTest.java
Outdated
Show resolved
Hide resolved
...c/test/java/com/netflix/spinnaker/kork/retrofit/exceptions/SpinnakerServerExceptionTest.java
Show resolved
Hide resolved
RetrofitErrorResponseBody body = | ||
(RetrofitErrorResponseBody) e.getBodyAs(RetrofitErrorResponseBody.class); | ||
responseBody = (Map<String, Object>) e.getBodyAs(HashMap.class); | ||
|
||
this.rawMessage = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a feeling we'll end up initializing rawMessage something like this
this.rawMessage = e.getMessage();
when we start handling e.g. non-json response bodies. It's possible that would simplify the code here even before that. I'm OK to leave this as it is for now....especially if there's a way to make rawMessage totally disappear.
9b40cd5
to
5ea7274
Compare
...fit/src/main/java/com/netflix/spinnaker/kork/retrofit/exceptions/SpinnakerHttpException.java
Outdated
Show resolved
Hide resolved
5ea7274
to
ee3c63d
Compare
ee3c63d
to
14d16fc
Compare
feat(retrofit): add accessor to exception response body as a map