MCPcopy Index your code
hub / github.com/cloudgraphdev/cli / printErrorMessage

Function printErrorMessage

src/storage/dgraph/utils.ts:26–35  ·  view source on GitHub ↗
(message: string, additionalInfo: any)

Source from the content-addressed store, hash-verified

24
25// Look for mutation name and color it red
26function printErrorMessage(message: string, additionalInfo: any): void {
27 let messageToShow = message
28 const found = additionalInfo?.executedMutationNames?.find((v: string) =>
29 message.includes(v)
30 )
31 if (found) {
32 messageToShow = message.replace(found, chalk.red(found))
33 }
34 messageToShow && logger.error(messageToShow)
35}
36
37function processErrorArrayIfExists({
38 errors,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected