Skip to content

Show captured exception for failed requests instead of "(failed)" (#1)#2

Merged
siddharthjaswal merged 1 commit into
mainfrom
fix/issue-1-show-failed-response-error
Jun 11, 2026
Merged

Show captured exception for failed requests instead of "(failed)" (#1)#2
siddharthjaswal merged 1 commit into
mainfrom
fix/issue-1-show-failed-response-error

Conversation

@siddharthjaswal

Copy link
Copy Markdown
Owner

Fixes #1.

Problem

When a request throws before a response arrives, the Response card rendered an opaque "(failed)" and the Overview showed only an ERR pill — the captured exception was never displayed anywhere, so failures were undiagnosable (see the screenshot in #1).

Changes

Plugin (Marketplace, → v0.9.10)

  • TransactionDetailView — the Response card now renders {"error": "<exception>"} with a Failed status instead of the literal "(failed)".
  • OverviewPanel — adds a red mono error line below the URL, shown only for failed calls.
  • Version bumped to 0.9.10; CHANGELOG.md and plugin.xml <change-notes> updated.

Library (JitPack, ships on next tag)

  • LogPoseInterceptor — catch widened from IOException to Throwable, so a downstream interceptor throwing a RuntimeException emits an error transaction (and rethrows unchanged) instead of leaving the transaction stuck "pending".

Notes / scope

In the OkHttp-throws case there is no Response object to render — the most we can surface is the exception text, which is what this does. The separate "a response existed but was lost to a downstream interceptor" case is only fixable by adding LogPose last in the chain, as the docs already instruct; asked the reporter to confirm their placement on the issue.

Verification

  • ./gradlew compileKotlin test — passes
  • cd logpose-android && ./gradlew compileDebugKotlin compileKotlin — passes

When a call throws before a response arrives, the plugin rendered an opaque
"(failed)" in the Response card and surfaced nothing else. Now both the
Response and Overview cards display the captured exception text, so the
failure is diagnosable.

Library: broaden the interceptor's catch from IOException to Throwable, so a
downstream interceptor that throws a RuntimeException emits an error
transaction (and rethrows unchanged) instead of leaving it stuck pending.

Bumps plugin to 0.9.10; updates CHANGELOG and plugin.xml change-notes.

Fixes #1
@siddharthjaswal
siddharthjaswal merged commit 51e273e into main Jun 11, 2026
2 checks passed
@siddharthjaswal
siddharthjaswal deleted the fix/issue-1-show-failed-response-error branch June 11, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed requests show a "failed" response instead of the actual response received by the server

1 participant