Skip to content

Display captured exceptions in Response Body UI for empty error responses #38

Description

@georgidhristov

Description

After PR #37, DebugProbe now captures:

  • ExceptionMessage
  • ExceptionStackTrace

for unhandled exceptions where the ASP.NET Core response body is empty.

The UI still renders the ResponseBody section as empty.

Current Behavior

For requests like:

GET /Demo/GetUser/500

the backend correctly stores exception details, but the UI shows:

  • Status: 500
  • Response Body: Empty

even though exception information exists in the stored DebugEntry.

Image

Expected Behavior

When:

  • ResponseBody is empty
  • and exception data exists

the UI should display the captured exception information inside the Response Body section (similar to Swagger exception output).

Example:

System.Exception: Database failure
   at DemoController.GetUser(...)
   at ...
Image Image

UI Logic

Something similar to:

if (string.IsNullOrWhiteSpace(entry.ResponseBody) &&
    !string.IsNullOrWhiteSpace(entry.ExceptionStackTrace))
{
    // Render exception details instead of empty response body
}

Notes

This is a UI-only issue.

Backend exception capture was already implemented in PR #37.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions