paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.8k stars 652 forks source link

[Staking] Propagate actual system error while staking::bond #5627

Closed Ank4n closed 2 weeks ago

Ank4n commented 3 weeks ago

Trivial and self explanatory changes.

Wrapping err such as these makes debugging harder as well as does not really give any meaningful reason why this happened. The increment of consumer can genuinely fail if there are no providers (account does not exist) or it reaches max consumers. In both cases, its better to propagate the actual System err.

bkchr commented 2 weeks ago

@Ank4n needs a prdoc file.

Ank4n commented 2 weeks ago

@Ank4n needs a prdoc file.

This can be silent right? Will put the right label.