Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error() call not returning the curl string as expected #25213

Closed
sanjan opened this issue Feb 5, 2024 · 3 comments · Fixed by #28576
Closed

Error() call not returning the curl string as expected #25213

sanjan opened this issue Feb 5, 2024 · 3 comments · Fixed by #28576
Labels

Comments

@sanjan
Copy link

sanjan commented Feb 5, 2024

return ErrOutputStringRequest

This call always returns the constant value: "output a string, please"

@hghaf099
Copy link
Contributor

hghaf099 commented Feb 6, 2024

Thank you for filing this issue and welcome to the Vault community. Would you please elaborate the issue a bit more with a clear reproducing steps? Note that to see the equivalent API call to perform the same operation as the CLI command, you can use the -output-curl-string flag after the subcommand as pointed out here. I hope this helps!

@sanjan
Copy link
Author

sanjan commented Mar 4, 2024

@hghaf099 there is no return call for the variable: finalCurlString , so calling Error() method always returns the constant string: ErrOutputStringRequest

@raskchanky
Copy link
Contributor

Hi @sanjan! Thanks for reaching out. You've uncovered an interesting area of the code that's quite confusing. I confess that before reading this issue, I didn't fully understand how -output-curl-string actually worked. The tl;dr is that although it's confusing, it's correct the way it is. I've opened #28576 which contains some additional comments that explains in more detail why it is the way it is. Thanks for bringing this area of confusion to our attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants