Standardize error messages: add prefixes and use string interpolation#268
Merged
joshuahannan merged 3 commits intomasterfrom Mar 25, 2026
Merged
Standardize error messages: add prefixes and use string interpolation#268joshuahannan merged 3 commits intomasterfrom
joshuahannan merged 3 commits intomasterfrom
Conversation
- Add ContractName.Resource.function: prefixes to all contract panics - Add transaction filename prefixes to all transaction panics - Replace all .concat() chaining with Cadence \() string interpolation - Embed relevant variable values (IDs, addresses, paths, types) directly - Remove redundant dead-code check in setup_account_to_receive_royalty.cdc - Resolves onflow/docs#795 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Also pulls in upgrades to cadence, flow-go, flow-go-sdk, atree, and various other transitive dependencies. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SupunS
approved these changes
Mar 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves onflow/docs#795
ContractName.Resource.function:prefixes to all contract-level panics so errors are immediately traceable to their sourcemint_nft:,transfer_nft:) to all transaction panics.concat()chaining with Cadence\()string interpolation throughoutsetup_account_to_receive_royalty.cdc(secondifwas unreachable after the first)Files changed
Contracts:
contracts/MetadataViews.cdc—Rarity.initcontracts/ExampleNFT.cdc—Collection.withdraw,createEmptyCollectioncontracts/utility/NFTForwarding.cdc—getSupportedNFTTypes,depositpost-condition,depositpanicTransactions:
transactions/mint_nft.cdctransactions/transfer_nft.cdctransactions/generic_transfer_with_address_and_type.cdctransactions/generic_transfer_with_paths.cdctransactions/generic_destroy_nft.cdctransactions/destroy_nft.cdctransactions/setup_account.cdctransactions/setup_account_from_nft_reference.cdctransactions/setup_account_to_receive_royalty.cdctransactions/unlink_collection.cdcTests:
tests/test_helpers.cdcTest plan
make test)flow test)make generate)🤖 Generated with Claude Code