Skip to content

ts: Include unresolved accounts in the resolution error message#3207

Merged
acheroncrypto merged 3 commits into
otter-sec:masterfrom
acheroncrypto:ts-include-unresolved-accounts-in-the-resolution-error-message
Aug 28, 2024
Merged

ts: Include unresolved accounts in the resolution error message#3207
acheroncrypto merged 3 commits into
otter-sec:masterfrom
acheroncrypto:ts-include-unresolved-accounts-in-the-resolution-error-message

Conversation

@acheroncrypto

Copy link
Copy Markdown
Collaborator

Problem

If account resolution fails to resolve all accounts, it throws:

Error: Reached maximum depth for account resolution

This is a pretty generic error and doesn't tell which accounts weren't able to get resolved, as also mentioned in #3111 (comment).

Summary of changes

  • Include the unresolved accounts in the resolution error message:

    Reached maximum depth for account resolution. Unresolved accounts: `pda`, `anotherPda`
    
  • Add a test case

Resolves #3111

@vercel

vercel Bot commented Aug 28, 2024

Copy link
Copy Markdown

@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@IaroslavMazur

Copy link
Copy Markdown

@acheroncrypto, do I need to do anything specific (maybe, activate some feature?) to start receiving the updated error message?

I'm still getting just the Error: Reached maximum depth for account resolution part - without the Unresolved accounts list 😐

@acheroncrypto

Copy link
Copy Markdown
Collaborator Author

@IaroslavMazur this was fixed but not yet published at the time of your comment. The latest version (v0.31.0) includes this commit.

https://www.anchor-lang.com/docs/updates/release-notes/0-31-0#error-improvements

@IaroslavMazur

Copy link
Copy Markdown

@IaroslavMazur this was fixed but not yet published at the time of your comment. The latest version (v0.31.0) includes this commit.

https://www.anchor-lang.com/docs/updates/release-notes/0-31-0#error-improvements

Awesome, thanks for getting back!

And congrats on finally releasing 0.31.0! 👏 💪

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Make accounts tell me what accounts I need to pass

2 participants