Skip to content

chore: add stable error link for direct function invocation#21237

Merged
benesjan merged 1 commit intomerge-train/fairiesfrom
benesjan/error-link-direct-fn-invocation
Mar 11, 2026
Merged

chore: add stable error link for direct function invocation#21237
benesjan merged 1 commit intomerge-train/fairiesfrom
benesjan/error-link-direct-fn-invocation

Conversation

@benesjan
Copy link
Contributor

@benesjan benesjan commented Mar 8, 2026

This was an old TODO of mine I had opened at a time when we didn't have the stable error links set up so made sense to tackle it now that we have them.

AI Summary

  • Adds https://docs.aztec.network/errors/6 to the compile-time error message shown when developers directly call contract functions (private, public, utility, or internal)
  • The /errors/6 redirect points to the existing calling_contracts docs page which documents self.call(), self.view(), and self.enqueue()
  • Adds the error to the debugging troubleshooting table in debugging.md

Adds https://docs.aztec.network/errors/6 to the compile-time error shown
when developers try to directly call contract functions. The link redirects
to the calling_contracts documentation page. Also adds the error to the
debugging troubleshooting table.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@benesjan benesjan requested a review from nventuro as a code owner March 8, 2026 08:16
@benesjan benesjan requested review from mverzilli and nchamo March 8, 2026 09:50
Copy link
Contributor

@nchamo nchamo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Way better 👏

@@ -1 +1 @@
Calling utility functions directly from within the contract is not supported. You attempted to call arbitrary_external_function. See documentation for instructions on the proper invocation of functions.
Calling utility functions directly from within the contract is not supported. You attempted to call arbitrary_external_function. See https://docs.aztec.network/errors/6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we take the opportunity to make this error consistent with the other ones?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What other ones?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You had:

  • "Direct invocation of private functions is not supported..."
  • "Direct invocation of public functions is not supported..."
  • "Direct invocation of public internal functions is not supported..."
  • "Calling utility functions directly from within the contract is not supported."

I thought we could have made it consistent

@benesjan benesjan merged commit 17b5601 into merge-train/fairies Mar 11, 2026
16 checks passed
@benesjan benesjan deleted the benesjan/error-link-direct-fn-invocation branch March 11, 2026 02:52
github-merge-queue bot pushed a commit that referenced this pull request Mar 11, 2026
BEGIN_COMMIT_OVERRIDE
chore: add stable error link for direct function invocation (#21237)
END_COMMIT_OVERRIDE
benesjan added a commit that referenced this pull request Mar 11, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
github-merge-queue bot pushed a commit that referenced this pull request Mar 13, 2026
BEGIN_COMMIT_OVERRIDE
fix: skip oracle version check for pinned protocol contracts (#21349)
fix: not reusing tags of partially reverted txs (#20817)
feat: move storage_slot from partial commitment to completion hash
(#21351)
feat: offchain reception (#20893)
fix: handle workspace members in needsRecompile crate collection
(#21284)
fix(aztec-nr): return Option from decode functions and fix event
commitment capacity (#21264)
fix: handle bad note lengths on compute_note_hash_and_nullifier (#21271)
fix: address review feedback from PRs #21284 and #21237 (#21369)
fix: claim contract & improve nullif docs (#21234)
feat!: auto-enqueue public init nullifier for contracts with public
functions (#20775)
fix: search for all note nonces instead of just the one for the note
index (#21438)
fix: set anvilSlotsInAnEpoch in e2e_offchain_payment to prevent
finalization race (#21452)
fix: complete legacy oracle mappings for all pinned contracts (#21404)
fix: correct inverted constrained encryption check in message delivery
(#21399)
feat!: improve L2ToL1MessageWitness API (#21231)
END_COMMIT_OVERRIDE
@AztecBot
Copy link
Collaborator

❌ Failed to cherry-pick to v4-next due to conflicts. (🤖) View backport run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants