Fixes wrong error messages shown#33
Open
acogn wants to merge 14 commits into
Open
Conversation
…thod errors Improve payment requirement negotiation and CLI error reporting so that error messages reflect the actual cause instead of defaulting to wallet-missing messaging. - Add CompatibilityReason metadata to PurlError::NoCompatibleMethod (missing wallet, unsupported token, network filtered) - Preserve reason data in PaymentNegotiator selection flow - Keep typed PurlError in CLI (avoid stringifying into anyhow) so suggestions can downcast and render reason-specific guidance - Update NoCompatibleMethod suggestions/related commands in CLI - Add negotiator and CLI tests for reason-aware behavior This fixes cases where a configured Solana wallet was reported as missing when the real issue was unsupported token configuration.
…timestamps Format wallet show timestamps as RFC3339
…oninteractive Suppress terminal hyperlinks in non-interactive output
Respect --wallet and --private-key during payment request execution
test fixes and full non-interactive modes
Contributor
|
@acogn overall looks good! there are some merge conflicts! |
…thod errors Improve payment requirement negotiation and CLI error reporting so that error messages reflect the actual cause instead of defaulting to wallet-missing messaging. - Add CompatibilityReason metadata to PurlError::NoCompatibleMethod (missing wallet, unsupported token, network filtered) - Preserve reason data in PaymentNegotiator selection flow - Keep typed PurlError in CLI (avoid stringifying into anyhow) so suggestions can downcast and render reason-specific guidance - Update NoCompatibleMethod suggestions/related commands in CLI - Add negotiator and CLI tests for reason-aware behavior This fixes cases where a configured Solana wallet was reported as missing when the real issue was unsupported token configuration.
Author
|
@stevekaliski-stripe should be fixed now Btw nice demo video! |
Contributor
|
@acogn some test failures! |
Author
|
@stevekaliski-stripe I fixed the flaky test failure by addressing a race condition on HOME. I changed it to a a shared serial_test key (home_env) to make them deterministic. Note that this issue was unrelated to the earlier changes in the PR. |
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.
Summary
PurlError::NoCompatibleMethod(MissingWallet,UnsupportedToken,NetworkFiltered)PurlErrorin CLI (anyhow::Error::from) so reason-aware suggestions can be shownNoCompatibleMethodsuggestions/related commands to reflect the real causeBug
When a server returns a payment requirement that is incompatible for non-wallet reasons (for example unsupported token), purl reported a wallet-missing style error even when a wallet was configured.
This happened because negotiation reduced compatibility checks to a boolean path and discarded the underlying cause, then CLI stringified the error and lost structured context.
Verification
cargo test -p purl-lib negotiator::testscargo test -p purl errors::testscargo run -- --dry-run https://www.getblauwdruk.com/for-agents/api