Problems Inserting an Assignment

50 views
Skip to first unread message

Ted K.

unread,
Jun 26, 2018, 4:20:22 PM6/26/18
to Interfacing With Aeries
I'm having issues inserting a new assignment into the demo site. No matter what I do I receive an error. I am trying to post to https://demo.aeries.net/aeries/api/v3/gradebooks/3778088/InsertAssignment?cert=477abe9e7d27439681d62f4e0de1f5e1.

The JSON that I'm sending is: {"Description":"Test the Aeries API","AssignmentCategoryCode":"T","DateAssigned":"2017-01-27","DateDue":"2017-02-17","NumberCorrectPossible":50,"PointsPossible":50,"Comment":"Make sure the Gradebook end points work","FormativeSummativeIndicator":"S","RubricAssignment":false,"ExternalID":"","CreateInLinkedGradebooksToo":true}


When I post this I receive the following response along with a 500 response code.

"Message":"An error has occurred.",
"ExceptionMessage":"Object reference not set to an instance of an object.",
"ExceptionType":"System.NullReferenceException",
"StackTrace":"   at AeriesLib.TableWrapper.SetPropValue(String FldName, Object FldValue)\r\n   at Aeries.API.v3.Public.Controllers.GradebookV3Controller.InsertAssignment(Int64 gn, AssignmentInsert AssignmentDetails)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"}

Can someone point me in the correct direction to fix this?

Thanks!

Ted K.

unread,
Jun 27, 2018, 11:13:59 AM6/27/18
to Interfacing With Aeries
A followup for anyone that winds up here.

Setting a header to "Content-Type: application/json" took care of the issue for us.

ho...@aeries.com

unread,
Jun 27, 2018, 5:22:04 PM6/27/18
to Interfacing With Aeries
I'm glad that you were able to resolve the issue. We also fixed the issue on the server side. It will be going out once it passes QC. 

Hoan @ aeries
Reply all
Reply to author
Forward
0 new messages