-
Notifications
You must be signed in to change notification settings - Fork 33
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
Clarify UnknownRemoteException message #659
Conversation
@@ -42,14 +42,14 @@ public String getBody() { | |||
} | |||
|
|||
public UnknownRemoteException(int status, String body) { | |||
super(String.format("Error %s. (Failed to parse response body as SerializableError.)", status)); | |||
super(String.format("UnknownRemoteException: %s", status)); |
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.
Tried to match the format of RemoteException
and ServiceException
.
What are the other scenarios UnknownRemoteException is thrown? |
This is the particular instance that prompted this PR. |
Makes sense, that case certainly cannot be parsed into a SerializableError, but the current message is confusing and makes it seem like something has gone wrong in an unexpected way. Lately we've seen proxies produce non-serializableerror non-2xx responses, and the wording makes folks thing there's a conjure client bug rather than a problem between services. For the wording, I'm not sure it makes sense to duplicate the class name in the message, our stack traces already include class name. Perhaps something along the lines of |
Yeah I've seen this also and is what I'm trying to mitigate with this PR.
Sure that seems reasonable. I was only trying to be consistent with the other exception messages which have the form |
Released 2.19.0 |
Before this PR
The
UnknownRemoteException
error message can be misleading. Dialogue usesUnknownRemoteException
for things other than just failing to deserialize aSerializableError
.After this PR
The
UnknownRemoteException
error message has been made a bit more generic to avoid being misleading.