{"timestamp": "2026-04-07 04:51:27.053", "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.<>c__DisplayClass2_0.<Get>b__0(IDbConnection conn) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 178
   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 65
   at IncidentReporter.DAL.Repositories.IncidentsRepo.Get(IncidentsFilter objIncidentFilter, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 177
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 144", "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.<>c__DisplayClass2_0.<Get>b__0(IDbConnection conn) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 178
   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 65
   at IncidentReporter.DAL.Repositories.IncidentsRepo.Get(IncidentsFilter objIncidentFilter, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 177
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 144"}
{"timestamp": "2026-04-07 04:51:27.564", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 04:51:27.735", "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.<>c__DisplayClass2_0.<Get>b__0(IDbConnection conn) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 178
   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 65
   at IncidentReporter.DAL.Repositories.IncidentsRepo.Get(IncidentsFilter objIncidentFilter, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 177
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 144", "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.<>c__DisplayClass2_0.<Get>b__0(IDbConnection conn) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 178
   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 65
   at IncidentReporter.DAL.Repositories.IncidentsRepo.Get(IncidentsFilter objIncidentFilter, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 177
   at IncidentReporter.API.BLL.IncidentsBLL.<Get>d__10.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 144"}
{"timestamp": "2026-04-07 04:51:27.752", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 05:07:44.317", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send audit log: Unauthorized
Request Payload: {"EntityTypeId":23,"EntityId":68266,"ChangedBy":{"UserId":5538,"Name":"Mozell Heaton"},"ChangeType":"Created","OldValue":null,"NewValue":{"Uid":"T/FBYDW/HSS/26/00042","Status":null,"Site":"Colver","UserType":null,"ReportedBy":"Mozell Heaton","Category":"HSE Suggestion","Department":"EHS","AssignedTo":null,"Severity":"","DueDate":"","UsersInvolved":null,"OthersInvolved":"","AssetsInvolved":"","IncidentDateTime":null,"Area":null}}
API Response: ", "stackTrace": ""}
{"timestamp": "2026-04-07 05:07:44.657", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "[DateStamper] Exception occurred while processing file D:\App-Data\iis\api-postgres.oqsha.com\attachments\248\incidents\images\204141_b8fc913e-aba5-45ab-856a-91ae1d5edac5.png: System.TypeInitializationException: The type initializer for 'NativeMagickSettings' threw an exception. ---> System.TypeInitializationException: The type initializer for 'X64' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'Magick.Native-Q16-x64.dll': Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
   at ImageMagick.Environment.NativeMethods.X64.Environment_SetEnv(IntPtr name, IntPtr value)
   at ImageMagick.Environment.NativeEnvironment.SetEnv(String name, String value)
   at ImageMagick.MagickNET.InitializeConfiguration(ConfigurationFiles configFiles, String newPath)
   at ImageMagick.Environment.NativeMethods.X64..cctor()
   --- End of inner exception stack trace ---
   at ImageMagick.Environment.NativeMethods.X64.Environment_Initialize()
   at ImageMagick.Environment.Initialize()
   at ImageMagick.MagickSettings.NativeMagickSettings..cctor()
   --- End of inner exception stack trace ---
   at ImageMagick.MagickSettings.NativeMagickSettings..ctor()
   at ImageMagick.MagickSettings..ctor()
   at ImageMagick.MagickImage..ctor()
   at ImageMagick.MagickImage..ctor(String fileName)
   at IncidentReporter.API.Helpers.DateStamperHelper.AddTimestampToImage(String inputFilePath) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\Helpers\DateStamperHelper.cs:line 19", "stackTrace": ""}
{"timestamp": "2026-04-07 05:10:05.991", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "."
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack 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.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.QueryMultiple(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter, List`1 incidentIds, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 1851
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3483", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "."
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack 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.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.QueryMultiple(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter, List`1 incidentIds, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 1851
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3483"}
{"timestamp": "2026-04-07 05:10:06.039", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 05:10:10.240", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "."
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack 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.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.QueryMultiple(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter, List`1 incidentIds, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 1851
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3483", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "."
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack 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.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.QueryMultiple(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter, List`1 incidentIds, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 1851
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3483"}
{"timestamp": "2026-04-07 05:10:10.259", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 05:10:52.558", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "."
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack 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.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.QueryMultiple(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter, List`1 incidentIds, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 1851
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3483", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "."
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack 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.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.QueryMultiple(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter, List`1 incidentIds, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 1851
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3483"}
{"timestamp": "2026-04-07 05:10:52.558", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 05:11:36.051", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "."
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack 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.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.QueryMultiple(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter, List`1 incidentIds, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 1851
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3483", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "."
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack 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.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.QueryMultiple(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter, List`1 incidentIds, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 1851
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3483"}
{"timestamp": "2026-04-07 05:11:36.051", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 05:12:28.534", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "."
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack 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.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.QueryMultiple(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter, List`1 incidentIds, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 1851
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3483", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "."
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack 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.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.QueryMultiple(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter, List`1 incidentIds, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 1851
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3483"}
{"timestamp": "2026-04-07 05:12:28.534", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 05:15:12.902", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "."
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack 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.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.QueryMultiple(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter, List`1 incidentIds, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 1851
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3483", "stackTrace": "Npgsql.PostgresException (0x80004005): 42601: syntax error at or near "."
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<>c__DisplayClass159_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlDataReader.<NextResult>d__46.MoveNext()
--- End of stack 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.QueryMultipleImpl(IDbConnection cnn, CommandDefinition& command)
   at Dapper.SqlMapper.QueryMultiple(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType)
   at IncidentReporter.DAL.Repositories.IncidentsRepo.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter, List`1 incidentIds, Int32& recordCount) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\IncidentsRepo.cs:line 1851
   at IncidentReporter.API.BLL.IncidentsBLL.GetIncidentHistory(IncidentHistoryFilter objIncidentHistoryFilter) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\IncidentsBLL.cs:line 3483"}
{"timestamp": "2026-04-07 05:15:12.915", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 05:41:39.500", "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.OsmoguardRepo.GetUserCountByRoleIdAndOrgId(Int32 roleId, Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OsmoguardRepo.cs:line 316
   at IncidentReporter.API.BLL.OsmoguardBLL.<>c__DisplayClass14_1.<GetAllRoles>b__1(OsmoGuardRole r) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\OsmoguardBLL.cs:line 654
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at IncidentReporter.API.BLL.OsmoguardBLL.<GetAllRoles>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\OsmoguardBLL.cs:line 653", "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.OsmoguardRepo.GetUserCountByRoleIdAndOrgId(Int32 roleId, Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OsmoguardRepo.cs:line 316
   at IncidentReporter.API.BLL.OsmoguardBLL.<>c__DisplayClass14_1.<GetAllRoles>b__1(OsmoGuardRole r) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\OsmoguardBLL.cs:line 654
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at IncidentReporter.API.BLL.OsmoguardBLL.<GetAllRoles>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\OsmoguardBLL.cs:line 653"}
{"timestamp": "2026-04-07 05:41:39.554", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: function time_format(character varying, unknown) 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.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of 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.WorkPermitRepo.<GetWorkPermitShiftTimingsByOrganisationAsync>d__71.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\WorkPermitRepo.cs:line 2528
--- End of stack trace from 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.WorkPermitBLL.<GetWorkPermitShiftTimingsByOrganisationAsync>d__31.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 2933", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: function time_format(character varying, unknown) 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.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of 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.WorkPermitRepo.<GetWorkPermitShiftTimingsByOrganisationAsync>d__71.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\WorkPermitRepo.cs:line 2528
--- End of stack trace from 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.WorkPermitBLL.<GetWorkPermitShiftTimingsByOrganisationAsync>d__31.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 2933"}
{"timestamp": "2026-04-07 05:41:39.554", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 05:41:39.554", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 05:42:40.309", "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 759", "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 759"}
{"timestamp": "2026-04-07 05:42:40.317", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 05:47:57.059", "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.OsmoguardRepo.GetUserCountByRoleIdAndOrgId(Int32 roleId, Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OsmoguardRepo.cs:line 316
   at IncidentReporter.API.BLL.OsmoguardBLL.<>c__DisplayClass14_1.<GetAllRoles>b__1(OsmoGuardRole r) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\OsmoguardBLL.cs:line 654
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at IncidentReporter.API.BLL.OsmoguardBLL.<GetAllRoles>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\OsmoguardBLL.cs:line 653", "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.OsmoguardRepo.GetUserCountByRoleIdAndOrgId(Int32 roleId, Int32 orgId) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OsmoguardRepo.cs:line 316
   at IncidentReporter.API.BLL.OsmoguardBLL.<>c__DisplayClass14_1.<GetAllRoles>b__1(OsmoGuardRole r) in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\OsmoguardBLL.cs:line 654
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at IncidentReporter.API.BLL.OsmoguardBLL.<GetAllRoles>d__14.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\OsmoguardBLL.cs:line 653"}
{"timestamp": "2026-04-07 05:47:57.075", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 05:47:57.171", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Npgsql.PostgresException (0x80004005): 42883: function time_format(character varying, unknown) 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.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of 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.WorkPermitRepo.<GetWorkPermitShiftTimingsByOrganisationAsync>d__71.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\WorkPermitRepo.cs:line 2528
--- End of stack trace from 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.WorkPermitBLL.<GetWorkPermitShiftTimingsByOrganisationAsync>d__31.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 2933", "stackTrace": "Npgsql.PostgresException (0x80004005): 42883: function time_format(character varying, unknown) 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.NpgsqlCommand.<ExecuteDbDataReader>d__95.MoveNext()
--- End of 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.WorkPermitRepo.<GetWorkPermitShiftTimingsByOrganisationAsync>d__71.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\WorkPermitRepo.cs:line 2528
--- End of stack trace from 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.WorkPermitBLL.<GetWorkPermitShiftTimingsByOrganisationAsync>d__31.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 2933"}
{"timestamp": "2026-04-07 05:47:57.171", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 06:19:36.527", "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.<GetOrgById>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 697
--- End of stack trace from previous location where exception was 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.<CreateWorkPermitAsync>d__8.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 124", "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.<GetOrgById>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 697
--- End of stack trace from previous location where exception was 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.<CreateWorkPermitAsync>d__8.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 124"}
{"timestamp": "2026-04-07 06:19:36.588", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 06:58:03.919", "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.<GetOrgById>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 697
--- End of stack trace from previous location where exception was 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.<CreateWorkPermitAsync>d__8.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 124", "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.<GetOrgById>d__16.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\OrganisationRepo.cs:line 697
--- End of stack trace from previous location where exception was 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.<CreateWorkPermitAsync>d__8.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 124"}
{"timestamp": "2026-04-07 06:58:03.954", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
{"timestamp": "2026-04-07 07:15:55.427", "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.WorkPermitRepo.<GetWorkPermitCategoriesByIds>d__102.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\WorkPermitRepo.cs:line 3679
--- End of stack trace from previous location where exception was 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.<ExportWorkPermitPdfAsync>d__50.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 3858", "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.WorkPermitRepo.<GetWorkPermitCategoriesByIds>d__102.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.DAL\Repositories\WorkPermitRepo.cs:line 3679
--- End of stack trace from previous location where exception was 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.<ExportWorkPermitPdfAsync>d__50.MoveNext() in C:\Users\windows\Osmosys\incident-reporter-api\IncidentReporter\IncidentReporter.API\BLL\WorkPermitBLL.cs:line 3858"}
{"timestamp": "2026-04-07 07:15:55.442", "level": "Error", "severity": "ERROR", "requestId": "", "httpMethod": "", "requestUrl": "", "message": "Failed to send log: Unauthorized", "stackTrace": ""}
