Skip to content

Bug: Exception is logged using ex.ToString() instead of structured exception logging in LogsListHandler #726

@ziagham

Description

@ziagham

What version of FlowSynx?

1.2.4

Describe the bug

The caught exception is being logged using ex.ToString() instead of passing the exception object into the logger.
This results in:

  • Loss of structured logging data
  • Stack traces not being captured properly
  • Reduced compatibility with logging providers (Serilog, Application Insights, ELK, etc.)
  • Makes error correlation and debugging more difficult

File: src/FlowSynx.Application/Features/Logs/Query/LogsList/LogsListHandler.cs
Line: 73

Current code

_logger.LogError(ex.ToString());

Proposed Fix

_logger.LogError(ex, "FlowSynxException caught in LogsListHandler handler.");

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions