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

Handle failed http requests better #634

Open
wfaulk opened this issue Oct 21, 2022 · 2 comments
Open

Handle failed http requests better #634

wfaulk opened this issue Oct 21, 2022 · 2 comments

Comments

@wfaulk
Copy link

wfaulk commented Oct 21, 2022

Any failed http request results in the program exiting:

lastpass-cli/http.c

Lines 344 to 345 in 8767b5e

if (ret != CURLE_OK && ret != CURLE_ABORTED_BY_CALLBACK)
die("%s.", curl_easy_strerror(ret));

If it's just getting the blob, it could still function with the local cache. It should either continue with the local cache, probably with a warning, or at least indicate that the local cache can be specified with --sync=no.

@wfaulk
Copy link
Author

wfaulk commented Oct 21, 2022

There seemed to have been a temporary outage of the lastpass.com web site that caused the CLI to produce the error:

Error: HTTP response code said error.

and exit without using the cached blob until I found the --sync=no option.

@artm
Copy link

artm commented Mar 7, 2023

Had encountered the same problem today, except lpass is integrated across multiple scripts and CLI tools in my workflow. My workaround is to set longer autosync time with export LPASS_AUTO_SYNC_TIME=$(( 24 * 60 * 60 )) in the shell where I run my tools from. As long as only read access to preexisting secrets is needed this fixes the infantile error message ("Computer said no" or something to that extent).

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

No branches or pull requests

2 participants