fix: remove leftover debug logging from client methods - #37
Merged
MaheshkumarSundaram merged 1 commit intoAug 19, 2026
Merged
Conversation
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.
Problem
Several client methods write to
console.logunconditionally on their successpaths, with no way for a consuming application to turn it off. The most disruptive is
ClientDefinitions.load(), which dumps the entire response:The server answers
/definitions/load/:namewith the model source, so every callprints a complete BPMN XML document — diagram interchange markup included — to the
host application's stdout.
In our case
definitions.load()sits behind a screen where users pick a workflow toview, so a full BPMN document is printed to the server log on every selection. It
buries real log output, and on a busy day it is a meaningful amount of disk.
The same pattern appears in
delete()andrename()(bareconsole.log(res)), inengine.invoke()andengine.restart()(console.log('invoke', options)— noterestartreports itself asinvoke), indefinitions.import(), and inWebService.upload(), which logs the status and full body of every upload response.These look like debugging aids that were not removed before release rather than
intentional diagnostics: they are unlabelled, unconditional, and print raw objects.
Change
Removes debug logging from success paths only:
src/BPMNClient.tsClientEngine.invokeconsole.log('invoke', options)src/BPMNClient.tsClientEngine.restartconsole.log('invoke', options)src/BPMNClient.tsClientDefinitions.importconsole.log('import ', …)andconsole.log('import done ', res)src/BPMNClient.tsClientDefinitions.loadconsole.log(res)src/BPMNClient.tsClientDefinitions.deleteconsole.log(res)src/BPMNClient.tsClientDefinitions.renameconsole.log(res)src/BPMNClient2.tssrc/WebService.tsuploadconsole.log('Response Status:', response.status, response.data)Error-path logging is left untouched. Every
console.log(res['errors'])and thecatchblocks inWebServiceare unchanged, so nothing that helps diagnose a failureis lost. The only behaviour change is that successful calls are quiet.
No signatures, return values or control flow change.
tsc --noEmitreports no newerrors against the baseline.
Testing
npx tsc --noEmit— no new errors versus baseline.node --checkon each modifieddistfile.definitions.load,engine.invokeanddefinitions.importall return identical values with no stdout output; error pathsstill log and throw as before.