{"timestamp": "2026-03-31 04:30:27.918", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 04:30:28.472", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 04:30:28.622", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471"}
{"timestamp": "2026-03-31 04:30:28.622", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 04:30:29.243", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186"}
{"timestamp": "2026-03-31 04:30:29.248", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 04:34:40.625", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 04:34:40.637", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 04:34:41.070", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471"}
{"timestamp": "2026-03-31 04:34:41.070", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 04:34:41.706", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186"}
{"timestamp": "2026-03-31 04:34:41.712", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:54:33.800", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 05:54:33.841", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:54:34.452", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471"}
{"timestamp": "2026-03-31 05:54:34.452", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:54:35.945", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186"}
{"timestamp": "2026-03-31 05:54:35.945", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:54:47.017", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetAppFilterUsers>d__57.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 1788
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetUsersforAppFilter>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 1764", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetAppFilterUsers>d__57.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 1788
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetUsersforAppFilter>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 1764"}
{"timestamp": "2026-03-31 05:54:47.017", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:54:47.827", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 05:54:47.827", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:54:47.930", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 05:54:47.937", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:54:47.999", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962"}
{"timestamp": "2026-03-31 05:54:47.999", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:54:48.030", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962"}
{"timestamp": "2026-03-31 05:54:48.030", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:54:49.080", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 05:54:49.080", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:58:59.554", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471"}
{"timestamp": "2026-03-31 05:58:59.554", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:58:59.687", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetAppFilterUsers>d__57.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 1788
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetUsersforAppFilter>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 1764", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetAppFilterUsers>d__57.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 1788
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetUsersforAppFilter>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 1764"}
{"timestamp": "2026-03-31 05:58:59.687", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 05:58:59.687", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:58:59.700", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:00.059", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 05:59:00.059", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:00.980", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962"}
{"timestamp": "2026-03-31 05:59:00.991", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:01.011", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962"}
{"timestamp": "2026-03-31 05:59:01.011", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 05:59:01.011", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:01.011", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:02.420", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 05:59:02.431", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:02.775", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 05:59:02.789", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:02.857", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$4"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.WorkPermitRepo.<GetAllWorkPermitCategories>d__65.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\WorkPermitRepo.cs:line 2311
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitCategories>d__29.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 2833", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$4"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.WorkPermitRepo.<GetAllWorkPermitCategories>d__65.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\WorkPermitRepo.cs:line 2311
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitCategories>d__29.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 2833"}
{"timestamp": "2026-03-31 05:59:02.875", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:02.971", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 05:59:02.977", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:03.791", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.Open()
   at IncidentReporter.DAL.Repositories.BaseRepo.ExecuteQuery[T](Func`2 query) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 64
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetUserAccessibleSites(Int32 orgId, Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 6493
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitsAsync>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 1919", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.Open()
   at IncidentReporter.DAL.Repositories.BaseRepo.ExecuteQuery[T](Func`2 query) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 64
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetUserAccessibleSites(Int32 orgId, Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 6493
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitsAsync>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 1919"}
{"timestamp": "2026-03-31 05:59:03.791", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:03.807", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.Open()
   at IncidentReporter.DAL.Repositories.BaseRepo.ExecuteQuery[T](Func`2 query) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 64
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetUserAccessibleSites(Int32 orgId, Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 6493
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitsAsync>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 1919", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.Open()
   at IncidentReporter.DAL.Repositories.BaseRepo.ExecuteQuery[T](Func`2 query) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 64
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetUserAccessibleSites(Int32 orgId, Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 6493
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitsAsync>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 1919"}
{"timestamp": "2026-03-31 05:59:03.807", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:05.513", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471"}
{"timestamp": "2026-03-31 05:59:05.522", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:06.328", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186"}
{"timestamp": "2026-03-31 05:59:06.336", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:10.070", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 05:59:10.070", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$4"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.WorkPermitRepo.<GetAllWorkPermitCategories>d__65.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\WorkPermitRepo.cs:line 2311
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitCategories>d__29.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 2833", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$4"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.WorkPermitRepo.<GetAllWorkPermitCategories>d__65.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\WorkPermitRepo.cs:line 2311
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitCategories>d__29.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 2833"}
{"timestamp": "2026-03-31 05:59:10.070", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:10.088", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:10.194", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 05:59:10.216", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:10.981", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.Open()
   at IncidentReporter.DAL.Repositories.BaseRepo.ExecuteQuery[T](Func`2 query) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 64
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetUserAccessibleSites(Int32 orgId, Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 6493
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitsAsync>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 1919", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.Open()
   at IncidentReporter.DAL.Repositories.BaseRepo.ExecuteQuery[T](Func`2 query) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 64
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetUserAccessibleSites(Int32 orgId, Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 6493
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitsAsync>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 1919"}
{"timestamp": "2026-03-31 05:59:10.991", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.Open()
   at IncidentReporter.DAL.Repositories.BaseRepo.ExecuteQuery[T](Func`2 query) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 64
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetUserAccessibleSites(Int32 orgId, Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 6493
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitsAsync>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 1919", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.Open()
   at IncidentReporter.DAL.Repositories.BaseRepo.ExecuteQuery[T](Func`2 query) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 64
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetUserAccessibleSites(Int32 orgId, Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 6493
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitsAsync>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 1919"}
{"timestamp": "2026-03-31 05:59:10.991", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 05:59:10.991", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:04:12.470", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198"}
{"timestamp": "2026-03-31 11:04:12.586", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 11:04:12.678", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136"}
{"timestamp": "2026-03-31 11:04:12.690", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961"}
{"timestamp": "2026-03-31 11:04:12.922", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:04:12.922", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:04:12.922", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:04:12.922", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:04:45.585", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "System.ArgumentException: The conversion could not be completed because the supplied DateTime did not have the Kind property set correctly.  For example, when the Kind property is DateTimeKind.Local, the source time zone must be TimeZoneInfo.Local.
Parameter name: sourceTimeZone
   at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData)
   at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone)
   at IncidentReporter.DAL.Helpers.TimeConverter.LocalTime(DateTime localDateTime, String timezone) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Helpers\FormulaHelper.cs:line 16
   at IncidentReporter.API.BLL.ReportsBLL.<GetIncidentCountsAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 264", "stackTrace": "System.ArgumentException: The conversion could not be completed because the supplied DateTime did not have the Kind property set correctly.  For example, when the Kind property is DateTimeKind.Local, the source time zone must be TimeZoneInfo.Local.
Parameter name: sourceTimeZone
   at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData)
   at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone)
   at IncidentReporter.DAL.Helpers.TimeConverter.LocalTime(DateTime localDateTime, String timezone) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Helpers\FormulaHelper.cs:line 16
   at IncidentReporter.API.BLL.ReportsBLL.<GetIncidentCountsAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 264"}
{"timestamp": "2026-03-31 11:04:45.595", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:04:53.833", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "System.ArgumentException: The conversion could not be completed because the supplied DateTime did not have the Kind property set correctly.  For example, when the Kind property is DateTimeKind.Local, the source time zone must be TimeZoneInfo.Local.
Parameter name: sourceTimeZone
   at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData)
   at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone)
   at IncidentReporter.DAL.Helpers.TimeConverter.LocalTime(DateTime localDateTime, String timezone) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Helpers\FormulaHelper.cs:line 16
   at IncidentReporter.API.BLL.ReportsBLL.<GetIncidentCountsAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 264", "stackTrace": "System.ArgumentException: The conversion could not be completed because the supplied DateTime did not have the Kind property set correctly.  For example, when the Kind property is DateTimeKind.Local, the source time zone must be TimeZoneInfo.Local.
Parameter name: sourceTimeZone
   at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData)
   at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone)
   at IncidentReporter.DAL.Helpers.TimeConverter.LocalTime(DateTime localDateTime, String timezone) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Helpers\FormulaHelper.cs:line 16
   at IncidentReporter.API.BLL.ReportsBLL.<GetIncidentCountsAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 264"}
{"timestamp": "2026-03-31 11:04:53.842", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:04:53.892", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136"}
{"timestamp": "2026-03-31 11:04:53.953", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:04:56.864", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "System.ArgumentException: The conversion could not be completed because the supplied DateTime did not have the Kind property set correctly.  For example, when the Kind property is DateTimeKind.Local, the source time zone must be TimeZoneInfo.Local.
Parameter name: sourceTimeZone
   at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData)
   at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone)
   at IncidentReporter.DAL.Helpers.TimeConverter.LocalTime(DateTime localDateTime, String timezone) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Helpers\FormulaHelper.cs:line 16
   at IncidentReporter.API.BLL.ReportsBLL.<GetIncidentCountsAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 264", "stackTrace": "System.ArgumentException: The conversion could not be completed because the supplied DateTime did not have the Kind property set correctly.  For example, when the Kind property is DateTimeKind.Local, the source time zone must be TimeZoneInfo.Local.
Parameter name: sourceTimeZone
   at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData)
   at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone)
   at IncidentReporter.DAL.Helpers.TimeConverter.LocalTime(DateTime localDateTime, String timezone) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Helpers\FormulaHelper.cs:line 16
   at IncidentReporter.API.BLL.ReportsBLL.<GetIncidentCountsAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 264"}
{"timestamp": "2026-03-31 11:04:56.871", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:06:36.880", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetActiveJobTypesByUserId>d__287.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 7886
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetActiveJobTypesByUserId>d__131.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 9088", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetActiveJobTypesByUserId>d__287.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 7886
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetActiveJobTypesByUserId>d__131.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 9088"}
{"timestamp": "2026-03-31 11:06:36.882", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$4"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.ContractorRepo.<GetAllContractorsRecords>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ContractorRepo.cs:line 631
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.ContractorBLL.<GetAllContractors>d__13.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ContractorBLL.cs:line 705", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$4"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.ContractorRepo.<GetAllContractorsRecords>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ContractorRepo.cs:line 631
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.ContractorBLL.<GetAllContractors>d__13.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ContractorBLL.cs:line 705"}
{"timestamp": "2026-03-31 11:06:36.882", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:06:36.882", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:06:37.880", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.PtwRepo.<GetAccessibleSiteIdsForUser>d__65.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 3049
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.PtwBLL.<GetAllPermitToWork>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\PtwBLL.cs:line 2516", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.PtwRepo.<GetAccessibleSiteIdsForUser>d__65.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 3049
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.PtwBLL.<GetAllPermitToWork>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\PtwBLL.cs:line 2516"}
{"timestamp": "2026-03-31 11:06:37.880", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.PtwRepo.<GetAccessibleSiteIdsForUser>d__65.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 3049
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.PtwBLL.<GetAllPermitToWork>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\PtwBLL.cs:line 2516", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.PtwRepo.<GetAccessibleSiteIdsForUser>d__65.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 3049
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.PtwBLL.<GetAllPermitToWork>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\PtwBLL.cs:line 2516"}
{"timestamp": "2026-03-31 11:06:37.883", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:06:37.883", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:06:43.983", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetAppFilterUsers>d__57.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 1788
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetUsersforAppFilter>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 1764", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetAppFilterUsers>d__57.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 1788
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetUsersforAppFilter>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 1764"}
{"timestamp": "2026-03-31 11:06:43.992", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:06:44.335", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 11:06:44.362", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:06:44.433", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962"}
{"timestamp": "2026-03-31 11:06:44.433", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:06:44.453", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962"}
{"timestamp": "2026-03-31 11:06:44.453", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:06:44.926", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 11:06:44.938", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:06:50.590", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 11:06:50.590", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:07:56.259", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471"}
{"timestamp": "2026-03-31 11:07:56.259", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:07:57.055", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186"}
{"timestamp": "2026-03-31 11:07:57.055", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:08:50.548", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Unhandled Exception in Web API", "stackTrace": "Npgsql.PostgresException (0x80004005): 42703: column "ud" of relation "user_devices" does not exist
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteNonQuery>d__87.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteNonQuery()
   at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader)
   at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.UserDeviceRepo.DeactivateAllUserDevices(Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UserDeviceRepo.cs:line 398
   at IncidentReporter.API.Controllers.RegistrationController.<Logout>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\Controllers\RegistrationController.cs:line 128
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()"}
{"timestamp": "2026-03-31 11:08:50.819", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198"}
{"timestamp": "2026-03-31 11:08:50.841", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:08:50.915", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 11:08:50.932", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:08:51.164", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136"}
{"timestamp": "2026-03-31 11:08:51.164", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961"}
{"timestamp": "2026-03-31 11:08:51.164", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:08:51.178", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:08:52.664", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Unhandled Exception in Web API", "stackTrace": "Npgsql.PostgresException (0x80004005): 42703: column "ud" of relation "user_devices" does not exist
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteNonQuery>d__87.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteNonQuery()
   at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader)
   at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.UserDeviceRepo.DeactivateAllUserDevices(Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UserDeviceRepo.cs:line 398
   at IncidentReporter.API.Controllers.RegistrationController.<Logout>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\Controllers\RegistrationController.cs:line 128
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()"}
{"timestamp": "2026-03-31 11:08:52.822", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198"}
{"timestamp": "2026-03-31 11:08:52.833", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:08:52.910", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 11:08:52.918", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:08:53.117", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961"}
{"timestamp": "2026-03-31 11:08:53.117", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136"}
{"timestamp": "2026-03-31 11:08:53.130", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:08:53.130", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:09:33.335", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Unhandled Exception in Web API", "stackTrace": "Npgsql.PostgresException (0x80004005): 42703: column "ud" of relation "user_devices" does not exist
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteNonQuery>d__87.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteNonQuery()
   at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader)
   at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.UserDeviceRepo.DeactivateAllUserDevices(Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UserDeviceRepo.cs:line 398
   at IncidentReporter.API.Controllers.RegistrationController.<Logout>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\Controllers\RegistrationController.cs:line 128
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()"}
{"timestamp": "2026-03-31 11:09:33.734", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198"}
{"timestamp": "2026-03-31 11:09:33.741", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:09:33.825", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 11:09:33.825", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:09:33.973", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961"}
{"timestamp": "2026-03-31 11:09:33.973", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136"}
{"timestamp": "2026-03-31 11:09:33.973", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:09:33.973", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:09:38.491", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Unhandled Exception in Web API", "stackTrace": "Npgsql.PostgresException (0x80004005): 42703: column "ud" of relation "user_devices" does not exist
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteNonQuery>d__87.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteNonQuery()
   at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader)
   at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.UserDeviceRepo.DeactivateAllUserDevices(Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UserDeviceRepo.cs:line 398
   at IncidentReporter.API.Controllers.RegistrationController.<Logout>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\Controllers\RegistrationController.cs:line 128
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()"}
{"timestamp": "2026-03-31 11:09:38.756", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198"}
{"timestamp": "2026-03-31 11:09:38.756", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:09:38.882", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 11:09:38.882", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:09:39.070", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136"}
{"timestamp": "2026-03-31 11:09:39.070", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:09:39.088", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961"}
{"timestamp": "2026-03-31 11:09:39.088", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:10:23.277", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198"}
{"timestamp": "2026-03-31 11:10:23.277", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:10:23.369", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 11:10:23.369", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:10:23.581", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961"}
{"timestamp": "2026-03-31 11:10:23.581", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136"}
{"timestamp": "2026-03-31 11:10:23.581", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:10:23.581", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:10:43.290", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198"}
{"timestamp": "2026-03-31 11:10:43.301", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:10:43.301", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 11:10:43.318", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:10:43.496", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136"}
{"timestamp": "2026-03-31 11:10:43.496", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961"}
{"timestamp": "2026-03-31 11:10:43.506", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:10:43.506", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:10:44.540", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Unhandled Exception in Web API", "stackTrace": "Npgsql.PostgresException (0x80004005): 42703: column "ud" of relation "user_devices" does not exist
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteNonQuery>d__87.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteNonQuery()
   at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader)
   at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.UserDeviceRepo.DeactivateAllUserDevices(Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UserDeviceRepo.cs:line 398
   at IncidentReporter.API.Controllers.RegistrationController.<Logout>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\Controllers\RegistrationController.cs:line 128
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()"}
{"timestamp": "2026-03-31 11:10:44.909", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 11:10:44.919", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:10:44.928", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198"}
{"timestamp": "2026-03-31 11:10:44.928", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:10:45.194", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136"}
{"timestamp": "2026-03-31 11:10:45.194", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:10:45.194", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961"}
{"timestamp": "2026-03-31 11:10:45.212", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:11:20.103", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 11:11:20.118", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:11:20.641", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471"}
{"timestamp": "2026-03-31 11:11:20.651", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:11:21.156", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186"}
{"timestamp": "2026-03-31 11:11:21.173", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:11:39.098", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 11:11:39.118", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:11:39.580", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471"}
{"timestamp": "2026-03-31 11:11:39.595", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:11:40.003", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186"}
{"timestamp": "2026-03-31 11:11:40.003", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:02.705", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetAppFilterUsers>d__57.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 1788
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetUsersforAppFilter>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 1764", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetAppFilterUsers>d__57.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 1788
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetUsersforAppFilter>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 1764"}
{"timestamp": "2026-03-31 11:12:02.705", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:02.968", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 11:12:02.968", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:03.171", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 11:12:03.180", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:03.239", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962"}
{"timestamp": "2026-03-31 11:12:03.239", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:03.253", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962"}
{"timestamp": "2026-03-31 11:12:03.270", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:03.691", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 11:12:03.707", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:21.602", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471"}
{"timestamp": "2026-03-31 11:12:21.611", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:21.939", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186"}
{"timestamp": "2026-03-31 11:12:21.939", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:45.598", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetAppFilterUsers>d__57.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 1788
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetUsersforAppFilter>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 1764", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetAppFilterUsers>d__57.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 1788
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetUsersforAppFilter>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 1764"}
{"timestamp": "2026-03-31 11:12:45.598", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:45.802", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 11:12:45.816", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:46.143", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 11:12:46.164", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:46.209", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962"}
{"timestamp": "2026-03-31 11:12:46.221", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:46.238", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962"}
{"timestamp": "2026-03-31 11:12:46.252", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:46.665", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 11:12:46.675", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:51.878", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 11:12:51.878", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:51.899", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$4"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.WorkPermitRepo.<GetAllWorkPermitCategories>d__65.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\WorkPermitRepo.cs:line 2311
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitCategories>d__29.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 2833", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$4"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.WorkPermitRepo.<GetAllWorkPermitCategories>d__65.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\WorkPermitRepo.cs:line 2311
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitCategories>d__29.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 2833"}
{"timestamp": "2026-03-31 11:12:51.907", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:51.962", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 11:12:51.972", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:52.690", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.Open()
   at IncidentReporter.DAL.Repositories.BaseRepo.ExecuteQuery[T](Func`2 query) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 64
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetUserAccessibleSites(Int32 orgId, Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 6493
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitsAsync>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 1919", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.Open()
   at IncidentReporter.DAL.Repositories.BaseRepo.ExecuteQuery[T](Func`2 query) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 64
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetUserAccessibleSites(Int32 orgId, Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 6493
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitsAsync>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 1919"}
{"timestamp": "2026-03-31 11:12:52.690", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:12:52.690", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.Open()
   at IncidentReporter.DAL.Repositories.BaseRepo.ExecuteQuery[T](Func`2 query) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 64
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetUserAccessibleSites(Int32 orgId, Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 6493
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitsAsync>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 1919", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.Open()
   at IncidentReporter.DAL.Repositories.BaseRepo.ExecuteQuery[T](Func`2 query) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 64
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetUserAccessibleSites(Int32 orgId, Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 6493
   at IncidentReporter.API.BLL.WorkPermitBLL.<GetAllWorkPermitsAsync>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 1919"}
{"timestamp": "2026-03-31 11:12:52.710", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:13:00.136", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 11:13:00.145", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:11.552", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 11:51:11.621", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:11.656", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$4"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.IncidentManagementRepo.<GetAllIncidentCategories>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentManagementRepo.cs:line 412
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentManagementBLL.<GetAllIncidentManagementCategories>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentManagementBLL.cs:line 822", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$4"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.IncidentManagementRepo.<GetAllIncidentCategories>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentManagementRepo.cs:line 412
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentManagementBLL.<GetAllIncidentManagementCategories>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentManagementBLL.cs:line 822"}
{"timestamp": "2026-03-31 11:51:11.663", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:11.708", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 11:51:11.708", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:14.875", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetActiveSites(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 3400
   at IncidentReporter.API.BLL.IncidentManagementBLL.<GetAllInvestigationCategories>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentManagementBLL.cs:line 1260", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetActiveSites(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 3400
   at IncidentReporter.API.BLL.IncidentManagementBLL.<GetAllInvestigationCategories>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentManagementBLL.cs:line 1260"}
{"timestamp": "2026-03-31 11:51:14.897", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:23.568", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "SEPARATOR"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.InspectionsRepo.GetAllInspectionTypes(Int32 orgId, InspectionTypeFilter filter, List`1 siteIds) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\InspectionsRepo.cs:line 2892
   at IncidentReporter.API.BLL.InspectionsBLL.<GetAllInspectionTypes>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\InspectionsBLL.cs:line 2141", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "SEPARATOR"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.InspectionsRepo.GetAllInspectionTypes(Int32 orgId, InspectionTypeFilter filter, List`1 siteIds) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\InspectionsRepo.cs:line 2892
   at IncidentReporter.API.BLL.InspectionsBLL.<GetAllInspectionTypes>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\InspectionsBLL.cs:line 2141"}
{"timestamp": "2026-03-31 11:51:23.606", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:27.402", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 11:51:27.402", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:27.435", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetRiskAssessmentStatusesByOrganisationId>d__24.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1100
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessmentStatuses>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 911", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetRiskAssessmentStatusesByOrganisationId>d__24.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1100
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessmentStatuses>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 911"}
{"timestamp": "2026-03-31 11:51:27.443", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:27.490", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetRiskAssessmentStatusesByOrganisationId>d__24.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1100
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessmentStatuses>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 911", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetRiskAssessmentStatusesByOrganisationId>d__24.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1100
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessmentStatuses>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 911"}
{"timestamp": "2026-03-31 11:51:27.490", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "SEPARATOR"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.RiskAssessmentRepo.<GetRiskAssessmentTypes>d__13.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 555
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetRiskAssessmentTypes>d__13.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 730", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "SEPARATOR"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.RiskAssessmentRepo.<GetRiskAssessmentTypes>d__13.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 555
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetRiskAssessmentTypes>d__13.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 730"}
{"timestamp": "2026-03-31 11:51:27.490", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:27.505", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:27.538", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetRiskAssessmentStatusesByOrganisationId>d__24.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1100
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessmentStatuses>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 911", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetRiskAssessmentStatusesByOrganisationId>d__24.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1100
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessmentStatuses>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 911"}
{"timestamp": "2026-03-31 11:51:27.538", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:28.326", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: LIMIT #,# syntax is not supported
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetAllRiskAssessments>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1372
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessments>d__17.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 961", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: LIMIT #,# syntax is not supported
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetAllRiskAssessments>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1372
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessments>d__17.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 961"}
{"timestamp": "2026-03-31 11:51:28.339", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:28.326", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: LIMIT #,# syntax is not supported
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetAllRiskAssessments>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1372
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessments>d__17.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 961", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: LIMIT #,# syntax is not supported
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetAllRiskAssessments>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1372
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessments>d__17.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 961"}
{"timestamp": "2026-03-31 11:51:28.353", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:53.092", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 11:51:53.102", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:53.102", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetRiskAssessmentStatusesByOrganisationId>d__24.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1100
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessmentStatuses>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 911", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetRiskAssessmentStatusesByOrganisationId>d__24.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1100
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessmentStatuses>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 911"}
{"timestamp": "2026-03-31 11:51:53.117", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:53.117", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 11:51:53.130", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:53.182", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "SEPARATOR"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.RiskAssessmentRepo.<GetRiskAssessmentTypes>d__13.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 555
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetRiskAssessmentTypes>d__13.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 730", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "SEPARATOR"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.RiskAssessmentRepo.<GetRiskAssessmentTypes>d__13.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 555
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetRiskAssessmentTypes>d__13.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 730"}
{"timestamp": "2026-03-31 11:51:53.182", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetRiskAssessmentStatusesByOrganisationId>d__24.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1100
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessmentStatuses>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 911", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetRiskAssessmentStatusesByOrganisationId>d__24.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1100
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessmentStatuses>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 911"}
{"timestamp": "2026-03-31 11:51:53.191", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:53.191", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:53.270", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetRiskAssessmentStatusesByOrganisationId>d__24.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1100
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessmentStatuses>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 911", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetRiskAssessmentStatusesByOrganisationId>d__24.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1100
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessmentStatuses>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 911"}
{"timestamp": "2026-03-31 11:51:53.270", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:54.139", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: LIMIT #,# syntax is not supported
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetAllRiskAssessments>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1372
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessments>d__17.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 961", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: LIMIT #,# syntax is not supported
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetAllRiskAssessments>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1372
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessments>d__17.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 961"}
{"timestamp": "2026-03-31 11:51:54.147", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:51:54.177", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: LIMIT #,# syntax is not supported
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetAllRiskAssessments>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1372
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessments>d__17.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 961", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: LIMIT #,# syntax is not supported
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.RiskAssessmentRepo.<GetAllRiskAssessments>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\RiskAssessmentRepo.cs:line 1372
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.API.BLL.RiskAssessmentBLL.<GetAllRiskAssessments>d__17.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\RiskAssessmentBLL.cs:line 961"}
{"timestamp": "2026-03-31 11:51:54.177", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:52:03.395", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Unhandled Exception in Web API", "stackTrace": "Npgsql.PostgresException (0x80004005): 42703: column "ud" of relation "user_devices" does not exist
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteNonQuery>d__87.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteNonQuery()
   at Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, CommandDefinition& command, Action`2 paramReader)
   at Dapper.SqlMapper.ExecuteImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.UserDeviceRepo.DeactivateAllUserDevices(Int32 userId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UserDeviceRepo.cs:line 398
   at IncidentReporter.API.Controllers.RegistrationController.<Logout>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\Controllers\RegistrationController.cs:line 128
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()"}
{"timestamp": "2026-03-31 11:52:07.524", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$5"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.ReportsRepo.GetIncidentCategoryCounts(Int32 orgId, DateTime FromDate, DateTime ToDate, List`1 locationId, List`1 DivisionId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\ReportsRepo.cs:line 416
   at IncidentReporter.API.BLL.ReportsBLL.GetIncidentCategoryCounts(ReportsFilter reportsFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 198"}
{"timestamp": "2026-03-31 11:52:07.536", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:52:07.536", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 11:52:07.556", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:52:08.614", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetLocationIds(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2991
   at IncidentReporter.API.BLL.ReportsBLL.GetOrganisationStats(Int32 OrgId, DashboardCountFilter dashboardCountFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\ReportsBLL.cs:line 136"}
{"timestamp": "2026-03-31 11:52:08.630", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 11:52:08.630", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "od"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetOpenIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 2506
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentsAfterEscalation(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3961"}
{"timestamp": "2026-03-31 11:52:08.652", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:15:34.500", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 12:15:34.546", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:15:35.274", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471"}
{"timestamp": "2026-03-31 12:15:35.277", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:15:36.261", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186"}
{"timestamp": "2026-03-31 12:15:36.261", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:16:47.650", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetAppFilterUsers>d__57.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 1788
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetUsersforAppFilter>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 1764", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetAppFilterUsers>d__57.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 1788
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetUsersforAppFilter>d__25.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 1764"}
{"timestamp": "2026-03-31 12:16:47.650", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:16:47.942", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 12:16:47.948", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:16:48.093", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.DepartmentsRepo.<GetDepartmentsByOrgIdAsync>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\DepartmentsRepo.cs:line 492
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.DepartmentsBLL.<GetDepartmentsByOrgIdAsync>d__11.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\DepartmentsBLL.cs:line 357"}
{"timestamp": "2026-03-31 12:16:48.102", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:16:48.764", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 12:16:48.774", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:16:48.836", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962"}
{"timestamp": "2026-03-31 12:16:48.836", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$3"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.UsersRepo.<GetFieldStaffAndAppUsersAsync>d__331.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\UsersRepo.cs:line 9262
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.UsersBLL.<GetFieldStaffAndAppUsers>d__127.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\UsersBLL.cs:line 8962"}
{"timestamp": "2026-03-31 12:16:48.836", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:16:48.836", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:16:49.492", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteScalar>d__90.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteScalar()
   at Dapper.SqlMapper.ExecuteScalarImpl[T](IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.ExecuteScalar[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.PtwRepo.GetDefaultCompany(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\PtwRepo.cs:line 6184
   at IncidentReporter.API.BLL.IncidentsBLL.<ApplyFiltersAsync>d__110.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 7592
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 90"}
{"timestamp": "2026-03-31 12:16:49.492", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:17:57.980", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471"}
{"timestamp": "2026-03-31 12:17:57.991", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:17:58.900", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186"}
{"timestamp": "2026-03-31 12:17:58.900", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:18:02.464", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetActiveSites(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 3400
   at IncidentReporter.API.BLL.IncidentManagementBLL.<GetAllInvestigationCategories>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentManagementBLL.cs:line 1260", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetActiveSites(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 3400
   at IncidentReporter.API.BLL.IncidentManagementBLL.<GetAllInvestigationCategories>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentManagementBLL.cs:line 1260"}
{"timestamp": "2026-03-31 12:18:02.464", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:18:28.675", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 12:18:28.689", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:18:29.729", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetActiveSites(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 3400
   at IncidentReporter.API.BLL.IncidentManagementBLL.<GetAllInvestigationCategories>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentManagementBLL.cs:line 1260", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: boolean = integer
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReader(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.IncidentsRepo.GetActiveSites(Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 3400
   at IncidentReporter.API.BLL.IncidentManagementBLL.<GetAllInvestigationCategories>d__18.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentManagementBLL.cs:line 1260"}
{"timestamp": "2026-03-31 12:18:29.741", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:24:14.459", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146", "stackTrace": "Npgsql.NpgsqlException (0x80004005): No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)
   at Npgsql.NpgsqlConnector.<AuthenticateSASL>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Authenticate>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnector.<Open>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.ConnectorPool.<AllocateLong>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlConnection.<>c__DisplayClass32_0.<<Open>g__OpenLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.OrganisationRepo.<GetOrganisationPreferences>d__12.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 379
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetUserAccessibleModules>d__34.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1731
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.NotificationsBLL.<GetPendingActionsNotificationsCount>d__22.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\NotificationsBLL.cs:line 1146"}
{"timestamp": "2026-03-31 12:24:14.479", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:24:15.165", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471"}
{"timestamp": "2026-03-31 12:24:15.184", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 12:24:15.642", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186"}
{"timestamp": "2026-03-31 12:24:15.642", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 13:03:40.113", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: operator does not exist: task_categories_created_source = text
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryRowAsync>d__34`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<>c__DisplayClass161_0.<<GetTaskCategoryIdByAcmModuleId>b__0>d.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5082
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.BaseRepo.<ExecuteQueryAsync>d__7`1.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\BaseRepo.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.DAL.Repositories.TaskRepo.<GetTaskCategoryIdByAcmModuleId>d__161.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\TaskRepo.cs:line 5081
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.TaskBLL.<GetMultiSiteTaskCounts>d__73.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\TaskBLL.cs:line 5471"}
{"timestamp": "2026-03-31 13:03:40.167", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-03-31 13:03:41.823", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "$1"
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Dapper.SqlMapper.<QueryAsync>d__33`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at IncidentReporter.DAL.Repositories.EmployeeKpiRepo.<GetPlantMasterAverageRatings>d__72.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\EmployeeKpiRepo .cs:line 2371
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at IncidentReporter.API.BLL.EmployeeKpiBLL.<GetPlantMasterAverageRatings>d__46.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\EmployeeKpiBLL.cs:line 2186"}
{"timestamp": "2026-03-31 13:03:41.830", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
