Skip to content

Commit 85c2358

Browse files
authored
ServerError.TryCreate always returned true even if null (#20)
This popped up in requests not returning a body (e.g `404`)
1 parent cd99aab commit 85c2358

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Elastic.Transport/Products/Elasticsearch/Failures/ServerError.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static bool TryCreate(Stream stream, out ServerError serverError)
4444
try
4545
{
4646
serverError = Create(stream);
47-
return true;
47+
return serverError != null;
4848
}
4949
catch
5050
{

0 commit comments

Comments
 (0)