@@ -1109,10 +1109,7 @@ func formatMultiError(from string, multi []error, opts *formatOpts) string {
1109
1109
1110
1110
// Write errors out
1111
1111
var str strings.Builder
1112
- var traceMsg string
1113
- if opts .Verbose {
1114
- traceMsg = fmt .Sprintf ("Trace=[%s])" , from )
1115
- }
1112
+ traceMsg := fmt .Sprintf ("Trace=[%s])" , from )
1116
1113
_ , _ = str .WriteString (pretty .Sprint (headLineStyle (), fmt .Sprintf ("%d errors encountered: %s" , len (multi ), traceMsg )))
1117
1114
for i , errStr := range errorStrings {
1118
1115
// Indent each error
@@ -1160,11 +1157,10 @@ func formatCoderSDKError(from string, err *codersdk.Error, opts *formatOpts) str
1160
1157
if opts .Verbose {
1161
1158
_ , _ = str .WriteString (pretty .Sprint (headLineStyle (), fmt .Sprintf ("API request error to \" %s:%s\" . Status code %d" , err .Method (), err .URL (), err .StatusCode ())))
1162
1159
_ , _ = str .WriteString ("\n " )
1163
- if from != "" {
1164
- _ , _ = str .WriteString (pretty .Sprint (headLineStyle (), fmt .Sprintf ("Trace=[%s]" , from )))
1165
- _ , _ = str .WriteString ("\n " )
1166
- }
1167
1160
}
1161
+ // Always include this trace. Users can ignore this.
1162
+ _ , _ = str .WriteString (pretty .Sprint (headLineStyle (), fmt .Sprintf ("Trace=[%s]" , from )))
1163
+ _ , _ = str .WriteString ("\n " )
1168
1164
1169
1165
_ , _ = str .WriteString (pretty .Sprint (headLineStyle (), err .Message ))
1170
1166
if err .Helper != "" {
0 commit comments