Skip to content

Commit ae5a5fc

Browse files
committed
temp
1 parent 9befa0f commit ae5a5fc

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

components/gitpod-cli/cmd/ports-list.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package cmd
66

77
import (
88
"context"
9+
"errors"
910
"fmt"
1011
"os"
1112
"sort"
@@ -26,6 +27,9 @@ var listPortsCmd = &cobra.Command{
2627
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
2728
defer cancel()
2829

30+
err := errors.New("Sample Error")
31+
utils.LogError(ctx, err, "We're testing the error logging.")
32+
2933
ports, portsListError := supervisor_helper.GetPortsList(ctx)
3034

3135
if portsListError != nil {

components/gitpod-cli/pkg/utils/logError.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
gitpod "github.com/gitpod-io/gitpod/gitpod-cli/pkg/gitpod"
1818
supervisor_helper "github.com/gitpod-io/gitpod/gitpod-cli/pkg/supervisor-helper"
1919
ide_metrics "github.com/gitpod-io/gitpod/ide-metrics-api"
20-
"github.com/go-errors/errors"
2120
log "github.com/sirupsen/logrus"
2221
)
2322

@@ -57,7 +56,7 @@ func LogError(ctx context.Context, errToReport error, errorMessage string) {
5756
ideMetricsUrl := fmt.Sprintf("https://ide.%s/metrics-api/reportError", parsedUrl.Host)
5857

5958
reportErrorRequest := &ide_metrics.ReportErrorRequest{
60-
ErrorStack: errToReport.(*errors.Error).ErrorStack(),
59+
ErrorStack: "mocked error stack",
6160
Component: "gitpod-cli",
6261
Version: gitpod.Version,
6362
UserId: "", // todo: retrieve this from server

0 commit comments

Comments
 (0)