File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,6 @@ protected virtual async Task<HttpResponseMessage> SendRequestRaw(string requestC
163163 if ( ! httpResponse . IsSuccessStatusCode )
164164 {
165165 string responseContent = null ;
166- var ex = new HttpOperationException ( string . Format ( "Operation returned an invalid status code '{0}'" , statusCode ) ) ;
167166 if ( httpResponse . Content != null )
168167 {
169168 responseContent = await httpResponse . Content . ReadAsStringAsync ( ) . ConfigureAwait ( false ) ;
@@ -173,6 +172,7 @@ protected virtual async Task<HttpResponseMessage> SendRequestRaw(string requestC
173172 responseContent = string . Empty ;
174173 }
175174
175+ var ex = new HttpOperationException ( $ "Operation returned an invalid status code '{ statusCode } ', response body { responseContent } ") ;
176176 ex . Request = new HttpRequestMessageWrapper ( httpRequest , requestContent ) ;
177177 ex . Response = new HttpResponseMessageWrapper ( httpResponse , responseContent ) ;
178178 httpRequest . Dispose ( ) ;
You can’t perform that action at this time.
0 commit comments