yamachu / Mastodot

C# Library for Mastodon API. Easy Toot!
MIT License
26 stars 5 forks source link

Error occurred when deserializing json, should throw exception? return null? #4

Open yamachu opened 7 years ago

yamachu commented 7 years ago

Currently got invalid json response then throw Exception. But I don't want type try{}catch... each method when using Mastodon APIs. So should change that make user check valid instance or null?

var status = await client.PostNewStatus(null);
if (status == null)
{
// do error handling
}
else
{
// do something with status
}
yamachu commented 7 years ago

duplicated... #1