Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The app client should have a public method for quickly mapping pc to TEAL line/error message #367

Open
joe-p opened this issue Jan 6, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@joe-p
Copy link
Contributor

joe-p commented Jan 6, 2025

Problem

There some scenarios where a developer might have the PC of an error from a call that was performed outside te app client and thus was not parsed into a LogicError.

Solution

Proposal

There should be a simple function on the app client that takes in a pc number and spits back out the corresponding TEAL line and/or error message from ARC56.

Pros and Cons

Non-breaking change
Makes debugging easier for developers
Makes error handling easier in more complex scenarios

Dependencies

None

@robdmoore robdmoore added the enhancement New feature or request label Jan 9, 2025
@robdmoore
Copy link
Contributor

It's not quite as simple as that, but there is AppClient.exposeLogicError https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/app-client.ts#L792

@joe-p
Copy link
Contributor Author

joe-p commented Jan 9, 2025

Yeah the thought with this issue is that it could be a function that just takes in the PC. Primary use case is debugging errors without access to the full error itself. For example a user reports an error seen in the frontend that originiates from an inner transaction that wasn't handled by the outer app client.

@robdmoore
Copy link
Contributor

yeah for sure, it makes sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants