From ecf0e92ff9b3d1897df8f075a993a2d6808a895b Mon Sep 17 00:00:00 2001 From: Aniket Shinde Date: Tue, 13 Oct 2026 17:04:55 +0530 Subject: [PATCH 1/3] invalid result format type --- internal/commands/scan.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/internal/commands/scan.go b/internal/commands/scan.go index 1a796901..c0e7176d 100644 --- a/internal/commands/scan.go +++ b/internal/commands/scan.go @@ -2905,7 +2905,15 @@ func runCreateScanCommand( scanResponseModel = enrichScanResponseModel(cmd, scanResponseModel) err = printByScanInfoFormat(cmd, toScanView(scanResponseModel)) if err != nil { - return errors.Wrapf(err, "%s\n", failedCreating) + scanInfoFormat, _ := cmd.Flags().GetString(commonParams.ScanInfoFormatFlag) + scanBranch := scanResponseModel.Branch + if scanBranch == "" { + scanBranch, _ = cmd.Flags().GetString(commonParams.BranchFlag) + } + return errors.Errorf( + "Scan %s was created successfully on branch %s and is still running, but the scan info format %q is not supported. "+ + "Supported formats: list, table, json.", + scanResponseModel.ID, scanBranch, scanInfoFormat) } } // Wait until the scan is done: Queued, Running From f82ed0ddb310afbb3f06736f540f6164ec0588c1 Mon Sep 17 00:00:00 2001 From: Aniket Shinde Date: Thu, 15 Oct 2026 13:53:09 +0530 Subject: [PATCH 2/3] updated scan report wrong format message --- internal/commands/scan.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/internal/commands/scan.go b/internal/commands/scan.go index c0e7176d..fdd55c56 100644 --- a/internal/commands/scan.go +++ b/internal/commands/scan.go @@ -2906,14 +2906,11 @@ func runCreateScanCommand( err = printByScanInfoFormat(cmd, toScanView(scanResponseModel)) if err != nil { scanInfoFormat, _ := cmd.Flags().GetString(commonParams.ScanInfoFormatFlag) - scanBranch := scanResponseModel.Branch - if scanBranch == "" { - scanBranch, _ = cmd.Flags().GetString(commonParams.BranchFlag) - } return errors.Errorf( - "Scan %s was created successfully on branch %s and is still running, but the scan info format %q is not supported. "+ + "Scan %s was created successfully and is currently running. "+ + "However, scan info won't be returned bec. the specified format %q is not supported. "+ "Supported formats: list, table, json.", - scanResponseModel.ID, scanBranch, scanInfoFormat) + scanResponseModel.ID, scanInfoFormat) } } // Wait until the scan is done: Queued, Running From 6b143765c38dc1e5928b76dc54fbc1d193775c0f Mon Sep 17 00:00:00 2001 From: Aniket Shinde Date: Thu, 15 Oct 2026 18:58:12 +0530 Subject: [PATCH 3/3] Update scan.go --- internal/commands/scan.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/commands/scan.go b/internal/commands/scan.go index fdd55c56..60fca692 100644 --- a/internal/commands/scan.go +++ b/internal/commands/scan.go @@ -2908,7 +2908,7 @@ func runCreateScanCommand( scanInfoFormat, _ := cmd.Flags().GetString(commonParams.ScanInfoFormatFlag) return errors.Errorf( "Scan %s was created successfully and is currently running. "+ - "However, scan info won't be returned bec. the specified format %q is not supported. "+ + "However, scan info won't be returned because the specified format %q is not supported. "+ "Supported formats: list, table, json.", scanResponseModel.ID, scanInfoFormat) }