Community
Showing results for 
Search instead for 
Do you mean 
Reply

500 Error when attempting to create a new contact

New Member
Posts: 5
Country: Australia

500 Error when attempting to create a new contact

I cant seem to create a contact via the api. I have striped it down to just sending the firstName, lastName and emailAddress but i just get a 500 error.

 

Below is the body of the response:

 

{
  "message": "An error has occurred.",
  "exceptionMessage": "Object reference not set to an instance of an object.",
  "exceptionType": "System.NullReferenceException",
  "stackTrace": "   at Act.Framework.Contacts.ContactManagerDB.EditData(Object data, Boolean isImport)\r\n   at Act.Framework.Contacts.ContactManagerDB.EditData(Object data)\r\n   at Act.Shared.Collections.MutableDataBroker`1.OnDataItemChanged(Guid key)\r\n   at Act.Framework.Contacts.Contact.ContactFieldCollection.Update(Boolean isImport)\r\n   at Act.Framework.MutableEntities.MutableEntity.Update()\r\n   at act.web.api.Services.ContactsService.CreateContact(Contact contact, ActFramework framework, Mapper mapper)\r\n   at act.web.api.Controllers.ContactsController.Post(Contact contact)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\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.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.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)\r\n   at act.web.api.Security.SecureMessageAttribute.d__c.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.Filters.ActionFilterAttribute.d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Web.Http.Filters.ActionFilterAttribute.d__5.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.Filters.ActionFilterAttribute.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.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.Controllers.AuthenticationFilterResult.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.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.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.Cors.CorsMessageHandler.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.HttpServer.d__0.MoveNext()"
}

 

New Member
Posts: 5
Country: USA

Re: 500 Error when attempting to create a new contact

See https://community.act.com/t5/Act-Premium-Web-API/Create-New-Contact-w-Zapier-500-Error/m-p/342413/hi... for a possible solution. The same error indicated in the post is in reference to creating a new contact. Not sure if it'll help in your instance or not. Let me know if this solution works for you.
Employee
Posts: 38
Country: USA

Re: 500 Error when attempting to create a new contact

This error is being raised because there is a require column defined for contacts, but it is not included in the API request.  The problem is that Act! metadata is reporting to the API that it is not required, but it is.  The best way to get around this issue is to upgrade your API V202:  You can download it here.

 

      https://www.act.com/download/download-act!-premium-v19

 

Please let me know if this doesn't fix your issue.