Skip to content

Commit 76c52ce

Browse files
fix: ensure error response properly serialized (#80)
Co-authored-by: ferhat elmas <[email protected]>
1 parent d7863ef commit 76c52ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/StreamException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ internal static StreamException FromResponse(RestResponse response)
5858
// {"code": 6, "detail": "The following feeds are not configured: 'secret'", "duration": "4ms", "exception": "FeedConfigException", "status_code": 400}
5959
ExceptionResponse state = null;
6060

61-
if (!string.IsNullOrWhiteSpace(response.Content))
61+
if (!string.IsNullOrWhiteSpace(response.Content) && response.Content.TrimStart().StartsWith("{"))
6262
{
6363
state = StreamJsonConverter.DeserializeObject<ExceptionResponse>(response.Content);
6464
}

0 commit comments

Comments
 (0)