Catch all exceptions on Deserialize

If you look at the source of NewtonSoft.Json, you'll see that DeserializeObject never throws an IOException. All exceptions should be caught in this method, just like Serialize.
This commit is contained in:
adamholdenyall 2015-07-28 09:53:10 -05:00
parent 52971e6aa9
commit a81e5096f5

View File

@ -235,7 +235,7 @@ namespace {{packageName}}.Client
{
return JsonConvert.DeserializeObject(content, type);
}
catch (IOException e)
catch (Exception e)
{
throw new ApiException(500, e.Message);
}