@@ -121,6 +121,16 @@ private async Task<TResponse> HttpRequest<TResponse>(HttpMethodType httpMethod,
121121 catch ( Exception e )
122122 {
123123 LogRestCall ( uri , endpoint , httpMethod , responseContent , success : false , logContent ) ;
124+
125+ #if STREAM_TESTS_ENABLED || STREAM_DEBUG_ENABLED
126+ var sb = new StringBuilder ( ) ;
127+ sb . AppendLine ( "API Response Deserialization failed - StreamDeserializationException:" ) ;
128+ sb . AppendLine ( "Target type: " + typeof ( APIErrorInternalDTO ) ) ;
129+ sb . AppendLine ( "Content:" ) ;
130+ sb . AppendLine ( responseContent ) ;
131+ _logs . Error ( sb . ToString ( ) ) ;
132+ #endif
133+
124134 throw new StreamDeserializationException ( responseContent , typeof ( TResponse ) , e ) ;
125135 }
126136
@@ -175,6 +185,16 @@ private async Task<TResponse> HttpRequest<TResponse>(HttpMethodType httpMethod,
175185 catch ( Exception e )
176186 {
177187 LogRestCall ( uri , endpoint , httpMethod , responseContent , success : false , logContent ) ;
188+
189+ #if STREAM_TESTS_ENABLED || STREAM_DEBUG_ENABLED
190+ var sb = new StringBuilder ( ) ;
191+ sb . AppendLine ( "API Response Deserialization failed - StreamDeserializationException:" ) ;
192+ sb . AppendLine ( "Target type: " + typeof ( APIErrorInternalDTO ) ) ;
193+ sb . AppendLine ( "Content:" ) ;
194+ sb . AppendLine ( responseContent ) ;
195+ _logs . Error ( sb . ToString ( ) ) ;
196+ #endif
197+
178198 throw new StreamDeserializationException ( responseContent , typeof ( TResponse ) , e ) ;
179199 }
180200 }
0 commit comments