Show captured exception for failed requests instead of "(failed)" (#1)#2
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1.
Problem
When a request throws before a response arrives, the Response card rendered an opaque
"(failed)"and the Overview showed only anERRpill — 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.0.9.10;CHANGELOG.mdandplugin.xml<change-notes>updated.Library (JitPack, ships on next tag)
LogPoseInterceptor— catch widened fromIOExceptiontoThrowable, so a downstream interceptor throwing aRuntimeExceptionemits an error transaction (and rethrows unchanged) instead of leaving the transaction stuck "pending".Notes / scope
In the OkHttp-throws case there is no
Responseobject 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— passescd logpose-android && ./gradlew compileDebugKotlin compileKotlin— passes