cmd/internal/pkgsite-cli/client: return fix suggestions
Example:
request timed out
To fix:
- use the -timeout flag to increase the timeout
- reduce size of request by limiting items returned
diff --git a/cmd/internal/pkgsite-cli/client/client.go b/cmd/internal/pkgsite-cli/client/client.go
index d964455..6fb7091 100644
--- a/cmd/internal/pkgsite-cli/client/client.go
+++ b/cmd/internal/pkgsite-cli/client/client.go
@@ -110,6 +110,14 @@
}
return b.String()
}
+ if len(e.Fixes) > 0 {
+ var b strings.Builder
+ fmt.Fprintf(&b, "%s (HTTP %d)\nTo fix:\n", e.Message, e.Code)
+ for _, f := range e.Fixes {
+ fmt.Fprintf(&b, " - %s\n", f)
+ }
+ return b.String()
+ }
return fmt.Sprintf("%s (HTTP %d)", e.Message, e.Code)
}
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Kokoro presubmit build finished with status: SUCCESS
Logs at: https://source.cloud.google.com/results/invocations/c38d0cd0-1d80-485f-8e47-6b993878073f
| kokoro-CI | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Kokoro presubmit build finished with status: SUCCESS
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |