Skip to content

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

@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/Audit/Query/AuditDetails/AuditDetailsHandler.cs
Line: 70

Current code

_logger.LogError(ex.ToString());

Proposed Fix

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions