JustGiving / JustGivingNETSDK

JustGiving C# SDK
1 stars 1 forks source link

Call to PageExists(string pageShortName) fails #1

Open JeffCalmRay opened 7 years ago

JeffCalmRay commented 7 years ago

Hi,

I've found the call to this method fails every time:

var client = new JustGivingApiClient("my-client-Id"); client.UseSandbox() var exists = await client.Fundraising.PageExists("my-page-short-name");

The error returned is as follows:

{"Message":"An error has occurred.","ExceptionMessage":"Cannot access a disposed object.\r\nObject name: 'System.Net.Http.StreamContent'.","ExceptionType":"System.ObjectDisposedException","StackTrace":" at System.Net.Http.HttpContent.CheckDisposed()\r\n at System.Net.Http.HttpContent.ReadAsStringAsync()\r\n at JustGivingSDK.Clients.ClientBase.casync0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at JustGivingSDK.Clients.Fundraising.FundraisingClient.casyncF.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n (etc)

Am I using this call incorrectly?

Kind regards,

Jeff