level: Error

severity: ERROR

message: Specified cast is not valid.

stackTrace:
System.InvalidCastException: Specified cast is not valid.
   at IncidentReporter.NotificationSender.Models.Event.Get[T](String strKey) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\Models\Event.cs:line 71
   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 1580


stackTrace:
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 10477
   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 1271


message: Object reference not set to an instance of an object.


stackTrace:
System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.
   at System.Net.HttpWebRequest.GetResponse()
   at IncidentReporter.NotificationSender.Helpers.WhatsappHelper.SendOsmoXMessage(String apiBody) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\Helpers\WhatsappHelper.cs:line 247


stackTrace:
System.InvalidCastException: Unable to cast object of type 'System.Int64' to type 'System.String'.
   at IncidentReporter.NotificationSender.Models.Event.Get[T](String strKey) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\Models\Event.cs:line 71
   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 1040


stackTrace:
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 10477
   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 1271


stackTrace:
System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\App-Data\iis\api-qa-staging.oqsha.com\api-qa-staging.oqsha.com\Apps\NotificationSender\'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
   at System.IO.File.ReadAllText(String path)
   at IncidentReporter.NotificationSender.EmailHelper.ReadFile(String template, String rootEmailTemplatePath) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\Helpers\EmailHelper.cs:line 171
   at IncidentReporter.NotificationSender.EmailHelper.SendEmail(String template, String subject, Object args, String toAddress, String ccAddress, List`1 reportAttachments, List`1 additionalAttachmentsFilePath, String rootEmailTemplatePath) in C:\Gitlab-Runner\builds\pmbcEkqkx\0\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\Helpers\EmailHelper.cs:line 57


message: Could not find a part of the path 'D:\App-Data\iis\api-qa-staging.oqsha.com\api-qa-staging.oqsha.com\Apps\NotificationSender\'.


stackTrace:
System.NullReferenceException: Object reference not set to an instance of an object.
   at IncidentReporter.NotificationSender.EmailHelper.SendEmail(String template, String subject, Object args, String toAddress, String ccAddress, List`1 reportAttachments, List`1 additionalAttachmentsFilePath, String rootEmailTemplatePath) in C:\Gitlab-Runner\builds\pmbcEkqkx\1\incident-reporter\incident-reporter-api\IncidentReporter\IncidentReporter.NotificationSender\Helpers\EmailHelper.cs:line 38