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

Improve error messages when building payloads for functions that take Object<T> #8735

Closed
banool opened this issue Jun 20, 2023 · 3 comments
Closed
Labels
documentation Improvements or additions to documentation enhancement New feature or request hackathon-feedback Issues that came from either something we noticed or from a participant during a hackathon move ops week sdk SDK related issues stale-exempt Prevents issues from being automatically marked and closed as stale

Comments

@banool
Copy link
Contributor

banool commented Jun 20, 2023

It is not obvious to new users what you're meant to do when an entry function takes Object<MyThing> as an argument. I have seen people try to do things like actually build an object in whatever native representation and/or serialize as BCS and pass that in (since they're new, they don't understand that it's really just a pointer).

In our SDKs if you're building a payload for an entry function that takes Object<T> you can just pass in an address. Indeed this is the only thing that works. As such our payload builders should return a very clear error in this case, like this:

Argument with type Object<T> expects an address (the address of the object) as an argument when building the payload
@banool banool added documentation Improvements or additions to documentation enhancement New feature or request move sdk SDK related issues ops week hackathon-feedback Issues that came from either something we noticed or from a participant during a hackathon labels Jun 20, 2023
@gregnazario
Copy link
Contributor

Is this a documentation thing or an error thing?

@gregnazario
Copy link
Contributor

Yes, the error messages need to be improved in the type_tag parsing

@gregnazario gregnazario moved this from 🎉 New to 🦆 Todo in Developer Platform Jul 19, 2023
@sausagee sausagee added the stale-exempt Prevents issues from being automatically marked and closed as stale label Sep 1, 2023
@gregnazario
Copy link
Contributor

Closed, SDK v1

@github-project-automation github-project-automation bot moved this from 🦆 Todo to ✅ Done in Developer Platform Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request hackathon-feedback Issues that came from either something we noticed or from a participant during a hackathon move ops week sdk SDK related issues stale-exempt Prevents issues from being automatically marked and closed as stale
Projects
Archived in project
Development

No branches or pull requests

3 participants