Skip to content

fix(cli): make error message more appropriate#1817

Closed
ian-fox wants to merge 1 commit intolacework:mainfrom
ian-fox:patch-1
Closed

fix(cli): make error message more appropriate#1817
ian-fox wants to merge 1 commit intolacework:mainfrom
ian-fox:patch-1

Conversation

@ian-fox
Copy link

@ian-fox ian-fox commented Feb 19, 2026

Summary

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: <specific error details follow>

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.

How did you test this change?

No functional changes, so I think the existing test suite should be sufficient.

Issue

No issues or tickets to reference because I figured it was easier to just make the pull request.

@ian-fox ian-fox requested a review from a team as a code owner February 19, 2026 15:20
@ian-fox
Copy link
Author

ian-fox commented Mar 5, 2026

@PengyuanZhao is there anything else I need to do for this one? It looks like the CI pipeline is still pending, I think a maintainer needs to approve them.

@lokesh-vadlamudi
Copy link
Collaborator

@ian-fox there is a trailing space in commit message which blocks CI pipeline.

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: <specific error details follow>`

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.
@ian-fox
Copy link
Author

ian-fox commented Mar 10, 2026

@lokesh-vadlamudi I think it should be fixed now!

@ian-fox
Copy link
Author

ian-fox commented Mar 11, 2026

I see that there are some failing checks still, but looking at the error messages they don't seem to be related to the change.

@lokesh-vadlamudi lokesh-vadlamudi enabled auto-merge (squash) March 11, 2026 18:24
@lokesh-vadlamudi
Copy link
Collaborator

just added your change in the #1818 (mentioned you in the commit message as well). Test cases were successful. Thanks @ian-fox.

auto-merge was automatically disabled March 12, 2026 19:07

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants