Repository navigation
fix: 🐛 resolve SonarCloud issues on the alpha release - #378
Merged
Merged
Conversation
Reliability: - await the offline transaction status update, which was fire and forget, so a failed write no longer goes unnoticed as an unhandled rejection - log a clear error when an offline service cannot register its message listener, instead of leaving the rejection unhandled - exit with a non zero code when the swagger spec cannot be written Code smells: - drop `async` from methods with no `await` in the local signer and API key stores and `PolymeshService.execTransaction`, returning settled promises so errors are still delivered as rejections
|
F-OBrien
approved these changes
Oct 19, 2026
Contributor
Author
|
/fast-forward |
Contributor
|
🎉 This PR is included in version 9.0.1-alpha.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.



JIRA Link
N/A
Changelog / Description
Resolves the 9 SonarCloud issues that fail the quality gate on #376 (alpha → master).
Reliability (S9383, unhandled promises):
OfflineSubmitterService.updateTransactionnow awaitsofflineTxRepo.updateTx. It was fire and forget, so a failed status write was never noticed..catchtoregisterListenerand log which listener failed to register. The previous unhandled rejection only produced a generic warning. Registration stays in the constructor, so a broker outage still leaves the REST API serving as before. Moving it toonModuleInitwas tried and rejected: with the broker down, the app stayed alive but never started serving HTTP.write-swaggerexits with code 1 when the spec can't be written.Code smells (S7503, async without await):
4. Removed
asyncfromLocalSigningService.getHandleByAddress/addSigner,LocalApiKeysRepo.getUserByApiKey/deleteApiKeyandPolymeshService.execTransaction. They return settled promises, so errors are still delivered as rejections.Local verification against alpha as a baseline:
Requests,SignaturesandEventsLogon both builds. Invalid messages were rejected and probe events recorded.apiKeyauth: signer add/duplicate/invalid/lookup and the API key create/use/delete flows return identical responses on both builds.write-swagger: same exit codes, and identical specs apart from generated example timestamps.Checklist -
🤖 Generated with Claude Code