level: Error

severity: ERROR

message: An unexpected error occurred.

stackTrace:
IncidentReporter.DAL.Exceptions.UpstreamServiceException: An unexpected error occurred.
   at IncidentReporter.API.Handlers.EntityStateWorkflowHandler.<GetStateTypesAsync>d__7.MoveNext() in C:\GitLab-Runner\builds\27n6lYj0J\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.API\Handlers\EntityStateWorkflowHandler.cs:line 337
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at IncidentReporter.RenewalReminder.Helpers.WorkPermitV2AutoCloseHelper.WorkPermitV2AutoCloseExecution() in C:\GitLab-Runner\builds\27n6lYj0J\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.RenewalReminder\Helpers\WorkPermitV2AutoCloseHelper.cs:line 61


stackTrace:
MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered during command execution. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Parameter '@OrgIds' must be defined.
   at MySql.Data.MySqlClient.Statement.SerializeParameter(MySqlParameterCollection parameters, MySqlPacket packet, String parmName, Int32 parameterIndex)
   at MySql.Data.MySqlClient.Statement.InternalBindParameters(String sql, MySqlParameterCollection parameters, MySqlPacket packet)
   at MySql.Data.MySqlClient.Statement.BindParameters()
   at MySql.Data.MySqlClient.PreparableStatement.Execute()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at Dapper.SqlMapper.ExecuteReaderWithFlagsFallback(IDbCommand cmd, Boolean wasClosed, CommandBehavior behavior)
   at Dapper.SqlMapper.<QueryImpl>d__138`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Dapper.SqlMapper.Query[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetPermitToWorkExceedingAutoUpdateInterval(List`1 orgIds) in C:\GitLab-Runner\builds\27n6lYj0J\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 4724
   at IncidentReporter.RenewalReminder.Helpers.PTWAutoStatusChangeHelper.PTWAutoStatusChangeExecution() in C:\GitLab-Runner\builds\27n6lYj0J\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.RenewalReminder\Helpers\PTWAutoStatusChangeHelper.cs:line 45


message: Fatal error encountered during command execution.