Skip to content

Commit 42bdba0

Browse files
committed
distinguish API down from unreachable in status command
When /status returns a non-2xx response the API is reachable but unhealthy, so report it as down rather than reusing the generic 'could not reach' message used for transport errors.
1 parent 7af1ce4 commit 42bdba0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cmd/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func runStatus(cmd *cobra.Command, args []string) error {
5050
defer resp.Body.Close()
5151

5252
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
53-
pterm.Error.Println("Could not reach Kernel API. Check https://status.kernel.sh for updates.")
53+
pterm.Error.Println("Kernel API is down. Check https://status.kernel.sh for updates.")
5454
return nil
5555
}
5656

0 commit comments

Comments
 (0)