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

Pallet asset wrong error returns #4779

Open
Daanvdplas opened this issue Jun 12, 2024 · 1 comment
Open

Pallet asset wrong error returns #4779

Daanvdplas opened this issue Jun 12, 2024 · 1 comment

Comments

@Daanvdplas
Copy link
Contributor

Daanvdplas commented Jun 12, 2024

I've noticed two scenarios where I'm calling a pallet asset dispatchable and it returns a token error, yet with a similar assets' error in existance:

  • mint an asset that does not exist returns DispatchError::Token(UnknownAsset) in stead of pallet assets' Unknown (ref).
  • burn greater amount of an asset with Preserve returns Token(FundsUnavailable) in stead of (I would say) BalanceLow, not sure though because we are burning.

Curious to hear what the expected behaviour is since for the second example it was clearly chosen to use the TokenError above the assets' error.

@Polkadot-Forum
Copy link

This issue has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/discussion-treating-changes-in-dispatchable-function-errors-as-breaking-changes/11222/4

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

2 participants