Skip to content

Commit

Permalink
Clarify UnknownContentTypeException
Browse files Browse the repository at this point in the history
UnknownContentTypeException message should contain information important for analyze error. 

Before the PR message contains only response content type.
After the PR message includes also status code.

Maybe response content should be also included. It would be useful for analyzing error, but on the other hand content may be very large.
  • Loading branch information
michaldo authored Jan 31, 2024
1 parent 00577ed commit b9b0b8f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public UnknownContentTypeException(Type targetType, MediaType contentType,
HttpStatusCode statusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody) {

super("Could not extract response: no suitable HttpMessageConverter found " +
"for response type [" + targetType + "] and content type [" + contentType + "]");
"for type [" + targetType + "] and response: code [" + statusCode.value() + "], content type [" + contentType + "]");

this.targetType = targetType;
this.contentType = contentType;
Expand Down

0 comments on commit b9b0b8f

Please sign in to comment.