Skip to content

Commit ec888ca

Browse files
committed
ErrorResponse.Info ignores properties that aren't strings
Resolves #241
1 parent 964ec24 commit ec888ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

SlackNet/WebApi/Responses/ErrorResponse.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ public class ErrorResponse
1313
[JsonExtensionData]
1414
private readonly IDictionary<string, JToken> _info = new Dictionary<string, JToken>();
1515

16-
public IReadOnlyDictionary<string, string> Info => _info.ToDictionary(e => e.Key, e => e.Value.ToObject<string>());
16+
public IReadOnlyDictionary<string, string> Info => _info
17+
.Where(i => i.Value.Type == JTokenType.String)
18+
.ToDictionary(e => e.Key, e => e.Value.ToObject<string>());
1719
}

0 commit comments

Comments
 (0)