Discussion: Treating Changes in Dispatchable Function Errors as Breaking Changes
Hello everyone,
I recently came across a PR in the Polkadot SDK repository (#3286) that introduces a change to the error returned by the pallet assets’ mint
dispatchable function in a specific case. While this might seem like a minor adjustment at first glance, I believe it constitutes a breaking change for smart contracts and other dependent applications that rely on this function’s behavior.
Why This Matters
Smart contracts and other integrations often depend not only on the successful execution of dispatchable functions but also on how errors are handled. A change in the error returned can impact contract logic, error handling mechanisms, and external systems that parse these responses. Any deviation from the expected error behavior could:
- Break Existing Contracts: Contracts relying on the previous error response may no longer function as intended.
- Impact Error Handling Logic: External applications, monitoring tools, and libraries might have implemented specific logic based on the prior error behavior.
- Create Deployment Risks: Developers upgrading to a newer SDK version might encounter unforeseen issues, leading to deployment failures or runtime errors.
My Concern
From reviewing the PR and associated discussions, it doesn’t seem like this change is being treated as a breaking change. I believe this underestimates the potential impact on users of the SDK.
I’d love to hear the community’s thoughts on this topic. Have others encountered issues arising from changes like this? Should the SDK team adopt a stricter policy regarding changes to errors in dispatchable functions?
Looking forward to your insights and feedback.
Best regards,
Daan | R0GUE