HTTP 500 when retrieving a position via the API

Tagged:

Currently contains 2 posts

Avatar

July 26, 2021 13:54

TIhelping

I see that someone already reported this error.

I am using this url https://www2.pcrecruiter.net/rest/api/positions/104812671951452?FieldsPlus=status,PositionId&Custom=Fecha%20compromiso%20cierre,%20Departamento%20Cliente,%20Fecha%20compromiso%20terna,%20Makechange

That a couple days ago it works fine but know it throw me an 500 error and in postman I see this:

{
“Message”: “An error has occurred.”,
“ExceptionMessage”: “Requested value ‘US’ was not found.”,
“ExceptionType”: “System.ArgumentException”,
“StackTrace”: " at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult)\r\n at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)\r\n at DataHandlerExtension.Mappers.PositionMapper.MapFieldEnumToPosition(enumPositions field, Position& p, String value) in C:\\mst-agile-git\\Source\\WebServices\\REST\\DataHandlerExtension\\Mappers\\PositionMapper.cs:line 228\r\n at DataHandlerExtension.DAL.PositionDataHandler.GetById(Int64 id, List`1 fields, List`1 customFields, List`1 eeocFields) in C:\\mst-agile-git\\Source\\WebServices\\REST\\DataHandlerExtension\\DAL\\Deprecated\\PositionDataHandler.cs:line 182\r\n at PcrRestApi.Controllers.PositionsController.Get(Int64 JobId, PositionRequest getRequest) in C:\\mst-agile-git\\Source\\WebServices\\REST\\PcrRestApi\\Controllers\\Deprecated\\PositionsController.cs:line 43\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(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.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.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.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.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.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.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.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.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.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"
}

Avatar

July 26, 2021 14:03

Jarrid-PCRecruiter

Please check your active positions Default Currency values. If any are set to “US” please change to “USD”.

Reply to thread