Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,11 @@ public static HttpResponse makeResponse(
public static String errorMessageWithRootCause(@Nonnull final Throwable e) {
StringBuilder msg = new StringBuilder();
final Throwable rootCause = Throwables.getRootCause(e);
msg.append("reason: \"");
msg.append("reason: ");
msg.append(e.getMessage());
msg.append("\"");
if (rootCause != null && rootCause != e && rootCause.getMessage() != null) {
msg.append(", root cause: \"");
msg.append(", root cause: ");
msg.append(rootCause.getMessage());
msg.append("\"");
}
return msg.toString();
}
Expand Down