Skip to content

fix: garbled FF10315 and FF10365 error messages - #1791

Open
NotAFlightRisk wants to merge 1 commit into
hyperledger-firefly:mainfrom
NotAFlightRisk:fix-error-inserts
Open

NotAFlightRisk wants to merge 1 commit into
hyperledger-firefly:mainfrom
NotAFlightRisk:fix-error-inserts

Conversation

@NotAFlightRisk

Copy link
Copy Markdown

Proposed changes

Mistype the method name when you invoke a contract API and the 400 comes back as FF10315: Unable to resolve contract method: sett%!(EXTRA <nil>). FF10365 does the same if you register a custom identity under a node - its text is one %s short, so it ends ... of type%!(EXTRA fftypes.FFEnum=custom).

No open issue, though FF10315 is the one from #1472. #1473 added the method name but left err in as an extra insert, wich the message has no slot for.


Types of changes

  • Bug fix (only the error text really, status codes stay the same)
  • New feature added
  • Documentation Update

Please make sure to follow these points

  • I have read the contributing guidelines.
  • I have performed a self-review of my own code or work.
  • I have commented my code, particularly in hard-to-understand areas. (nothing that needed it)
  • My changes generates no new warnings.
  • I have added tests that prove my fix is effective or that my feature works. (tightened the two existing asserts to check the end of the message, both fail without the fix)
  • My changes have sufficient code coverage (unit, integration, e2e tests).

Screenshots (If Applicable)

N/A


Other Information

For FF10315 I went with WrapError rather than a second %s in the text, since err is nil when the method just isnt there and you'd get <nil> on the end instead. A DB error still shows after the method name, eg ...: sett: pop.

Signed-off-by: Iain <iain1970@protonmail.com>
@NotAFlightRisk
NotAFlightRisk requested a review from a team as a code owner September 26, 2026 21:50

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant