System.ArgumentNullException: Value cannot be null.
Parameter name: format
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object arg0, Object arg1)
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendWorkPermitExtensionApprovedInformToCreatorNotification(String creatorId, String approverName, String workPermitId, String workPermitUid, String siteName, String organisationName, String approvedOn, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 10153
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1409


System.ArgumentNullException: Value cannot be null.
Parameter name: format
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object arg0, Object arg1)
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendWorkPermitExtensionApprovalInvitationNotification(String userIds, String creatorName, String workPermitId, String workPermitUid, String siteName, String organisationName, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 10223
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1422


System.Data.DataException: Error parsing column 23 (IncidentStatus=Validated - String) ---> System.ArgumentException: Requested value 'Validated' was not found.
   at System.Enum.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument)
   at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult)
   at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
   at Deserializefd23d5ab-b1fe-4f73-8055-408d4e1706fc(IDataReader )
   --- End of inner exception stack trace ---
   at Dapper.SqlMapper.ThrowDataException(Exception ex, Int32 index, IDataReader reader, Object value)
   at Deserializefd23d5ab-b1fe-4f73-8055-408d4e1706fc(IDataReader )
   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.IncidentsRepo.GetIncidentById(Int32 incidentId) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 777
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendUpdateIncidentNotification(Int64 incidentId, Int64 incidentHistoryId, Boolean isTicketAssigned) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 2592
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 422


System.ArgumentNullException: Value cannot be null.
Parameter name: format
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object arg0, Object arg1)
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendWorkPermitApprovedInformToCreatorNotification(String creatorId, String approverName, String workPermitId, String workPermitUid, String siteName, String organisationName, String approvedOn, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 9788
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1382


System.ArgumentNullException: Value cannot be null.
Parameter name: format
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object arg0, Object arg1)
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendWorkPermitApprovalInvitationNotification(String userIds, String creatorName, String workPermitId, String workPermitUid, String siteName, String organisationName, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 9858
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1395


System.Data.DataException: Error parsing column 23 (IncidentStatus=Validated - String) ---> System.ArgumentException: Requested value 'Validated' was not found.
   at System.Enum.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument)
   at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult)
   at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
   at Deserializefd23d5ab-b1fe-4f73-8055-408d4e1706fc(IDataReader )
   --- End of inner exception stack trace ---
   at Dapper.SqlMapper.ThrowDataException(Exception ex, Int32 index, IDataReader reader, Object value)
   at Deserializefd23d5ab-b1fe-4f73-8055-408d4e1706fc(IDataReader )
   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.IncidentsRepo.GetIncidentById(Int32 incidentId) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 777
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.<SendIncidentClosureNotification>d__113.MoveNext() in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 7825
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()


System.ArgumentNullException: Value cannot be null.
Parameter name: format
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object arg0, Object arg1)
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendNotificationForWorkPermitCreation(String approverIdsJson, String workPermitId, String organisationName, String siteName, String createdByUserName, String workPermitUid, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 9612
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1337


System.NullReferenceException: Object reference not set to an instance of an object.
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendTaskOpenDetailsToSiteEHS(Int64 taskId, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 9423
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1245


MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered during command execution. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Parameter '@TicketStatusName' 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.TaskRepo.GetValidationUsersFromPreferences(Int32 orgId, Int32 moduleId, String taskStatusName, Int32 siteId) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 4606
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendTaskOpenDetailsToSiteEHS(Int64 taskId, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 9450
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1245


MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered during command execution. ---> MySql.Data.MySqlClient.MySqlException (0x80004005): Parameter '@TicketStatusName' 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.TaskRepo.GetValidationUsersFromPreferences(Int32 orgId, Int32 moduleId, String taskStatusName, Int32 siteId) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 4613
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendTaskOpenDetailsToSiteEHS(Int64 taskId, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 9450
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1245


System.NullReferenceException: Object reference not set to an instance of an object.
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendTaskOpenDetailsToSiteEHS(Int64 taskId, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 9423
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1245


System.ArgumentNullException: Value cannot be null.
Parameter name: format
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object arg0, Object arg1)
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendNotificationForWorkPermitCreation(String approverIdsJson, String workPermitId, String organisationName, String siteName, String createdByUserName, String workPermitUid, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 9612
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1337


System.ArgumentNullException: Value cannot be null.
Parameter name: format
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object arg0, Object arg1)
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendWorkPermitApprovedInformToCreatorNotification(String creatorId, String approverName, String workPermitId, String workPermitUid, String siteName, String organisationName, String approvedOn, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 9788
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1382


System.ArgumentNullException: Value cannot be null.
Parameter name: format
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object arg0, Object arg1)
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendWorkPermitExtensionApprovedInformToCreatorNotification(String creatorId, String approverName, String workPermitId, String workPermitUid, String siteName, String organisationName, String approvedOn, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 10153
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1409


System.ArgumentNullException: Value cannot be null.
Parameter name: format
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object arg0, Object arg1)
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendWorkPermitApprovalInvitationNotification(String userIds, String creatorName, String workPermitId, String workPermitUid, String siteName, String organisationName, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 9858
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1395


System.ArgumentNullException: Value cannot be null.
Parameter name: format
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object arg0, Object arg1)
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendWorkPermitExtensionApprovalInvitationNotification(String userIds, String creatorName, String workPermitId, String workPermitUid, String siteName, String organisationName, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 10223
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1422


System.ArgumentNullException: Value cannot be null.
Parameter name: format
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object arg0, Object arg1)
   at IncidentReporter.NotificationSender.DAL.Events.Notifier.SendNotificationToApproversForWorkPermitStatusChange(String approverIdsJson, String workPermitId, String newStatus, String changedByName, String organisationName, String siteName, String createdByUserName, String workPermitUid, Int64 orgId) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\Notifier.cs:line 9530
   at IncidentReporter.NotificationSender.DAL.Events.EventHandler.HandleMessage(IMessage message) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\DAL\Events\EventHandler.cs:line 1324