From 9aaac8a07d178feb21f585363786794641bb7330 Mon Sep 17 00:00:00 2001 From: Ian Fox Date: Thu, 19 Feb 2026 16:18:29 +0100 Subject: [PATCH] fix(cli): make error message more appropriate When using the CLI to make an API request that returns a status code indicating an error, the CLI currently prints an error message of the form `ERROR unable to send the request: ` That message isn't entirely accurate, as this path is also hit if the error comes from the server - e.g. if the server returns a 4XX or 5XX response. This change makes the message more generic so that it applies even if the error occurred after the request was sent. No issues or tickets to reference because I figured it was easier to just make the pull request. --- cli/cmd/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/cmd/api.go b/cli/cmd/api.go index df7b43f63..a3d30ba65 100644 --- a/cli/cmd/api.go +++ b/cli/cmd/api.go @@ -94,7 +94,7 @@ func runApiCommand(_ *cobra.Command, args []string) error { response, ) if err != nil { - return errors.Wrap(err, "unable to send the request") + return errors.Wrap(err, "an error occurred with the request") } if err := cli.OutputJSON(*response); err != nil {