Version: observed on 0.99.0; re-checked against main @ 145e9e1a — unchanged.
What happens
When a verifier rejects a presentation response, uriSchemePresentment asserts the status with a bare check(...) and drops the body:
|
check(postResponseResponse.status == HttpStatusCode.OK) |
The wallet therefore receives:
IllegalStateException: Check failed.
The verifier's actual explanation — the only thing that tells a user or a developer why the presentation was refused — is never read. Because check(...) without a message produces a fixed string, the app cannot distinguish this failure from any other check in the same function either.
Suggested fix
Read the response body and include it, along with the status code, in the thrown exception — the same shape as the neighbouring reader-side checks at L268-L269, which do report the status. A dedicated exception type carrying status + body would be better still, since a wallet usually wants to show the verifier's message rather than a stack trace.
Related
Workaround we ship
Our presenter string-matches "Check failed." and substitutes a readable sentence. Matching on an exception message is exactly as fragile as it sounds.
Version: observed on 0.99.0; re-checked against
main@145e9e1a— unchanged.What happens
When a verifier rejects a presentation response,
uriSchemePresentmentasserts the status with a barecheck(...)and drops the body:multipaz/multipaz/src/commonMain/kotlin/org/multipaz/presentment/uriSchemePresentment.kt
Line 162 in 145e9e1
The wallet therefore receives:
The verifier's actual explanation — the only thing that tells a user or a developer why the presentation was refused — is never read. Because
check(...)without a message produces a fixed string, the app cannot distinguish this failure from any othercheckin the same function either.Suggested fix
Read the response body and include it, along with the status code, in the thrown exception — the same shape as the neighbouring reader-side checks at L268-L269, which do report the status. A dedicated exception type carrying status + body would be better still, since a wallet usually wants to show the verifier's message rather than a stack trace.
Related
Content-Typecheck two lines below this one, so this function has already been through one round of this treatment.Workaround we ship
Our presenter string-matches
"Check failed."and substitutes a readable sentence. Matching on an exception message is exactly as fragile as it sounds.