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

better error message on unsupported return type #45

Open
amir-arad opened this issue Jun 1, 2020 · 1 comment
Open

better error message on unsupported return type #45

amir-arad opened this issue Jun 1, 2020 · 1 comment

Comments

@amir-arad
Copy link

When accidentally returning a boolean from the contract, I get the error:

     Error: received argument 0 has unknown type: 65535
      at Ce (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:8:29510)
      at et (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:8:38018)
      at e.<anonymous> (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:8:47002)
      at c (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:1:171510)
      at Generator._invoke (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:1:171298)
      at Generator.e.<computed> [as next] (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:1:171932)
      at r (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:1:24553)
      at o (node_modules/orbs-client-sdk/dist/orbs-client-sdk.js:1:24763)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)

a better error message could state the supported types, and/or direct to the data types documentation.

@amir-arad
Copy link
Author

out of scope questions that arise:

  • why is uint16 used for the type enum (why not uint8)?
  • why not support smallest return types (byte)?

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

No branches or pull requests

1 participant