pipedrive-dotnet
pipedrive-dotnet copied to clipboard
Subscription.GetByDealId trows NullReferenceException if the Subscription not Exist
When I call GetByDealId the library throws NullReferenceException if there is no Subscription
var res = await client.Subscription.GetByDealId(65);
The HttpRespons code is No content.
public async Task<T> Get<T>(Uri uri, IDictionary<string, string> parameters)
{
Ensure.ArgumentNotNull(uri, nameof(uri));
var response = await Connection.Get<JsonResponse<T>>(uri, parameters, null).ConfigureAwait(false);
return response.Body.Data;
}
Body is in this case null which causes the error when it trys to access .Data