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

Improve and Tweak behaviour for --dropbox-refresh-token #34

Closed
IAmVigneswaran opened this issue Feb 12, 2024 · 0 comments
Closed

Improve and Tweak behaviour for --dropbox-refresh-token #34

IAmVigneswaran opened this issue Feb 12, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@IAmVigneswaran
Copy link
Contributor

@arjunprakash027

When --dropbox-refresh-token is uses, can we add a step / logic to clear the terminal screen before

INFO: Airlift version 1.0.6 appears?


STEP: 1. Go to: https://www.dropbox.com/oauth2/authorize?response_type=code&client_id=.............
STEP: 2. Click "Allow" (you might have to log in first).
STEP: 3. Copy the authorization code.
Enter the authorization code here: 

Change the text from WARNING to STEP. That way the message would appear more user friendly.


After success update of refresh token and when Refresh Token updated in the json file! is it possible to kill and close the terminal via code?


Right now when user presses enter without authorization code, Airlift throws this error. We need to make it user friendly.

WARNING: error during retreival of refresh token
ERROR: Error at division
Traceback (most recent call last):
  File "airlift/dropbox_client.py", line 138, in change_refresh_access_token
  File "dropbox/oauth.py", line 350, in finish
  File "dropbox/oauth.py", line 189, in _finish
  File "requests/models.py", line 1021, in raise_for_status
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.dropboxapi.com/oauth2/token

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "airlift/cli.py", line 74, in cli
  File "airlift/dropbox_client.py", line 152, in change_refresh_access_token
airlift.utils_exceptions.CriticalError: error during retreival of refresh token

Maybe we can make it in this way.

  1. WARNING: Error during retrieval of refresh token
  2. Do you want to try again? (Y/N) IF Y, it would start the Loop with the App Key Again.
  3. If N It would clear the terminal and close the terminal.
@IAmVigneswaran IAmVigneswaran added this to the 1.0.7 milestone Feb 12, 2024
@IAmVigneswaran IAmVigneswaran added the enhancement New feature or request label Feb 12, 2024
@IAmVigneswaran IAmVigneswaran changed the title Improve and Tweak output for --dropbox-refresh-token Improve and Tweak behaviourt for --dropbox-refresh-token Feb 12, 2024
@IAmVigneswaran IAmVigneswaran changed the title Improve and Tweak behaviourt for --dropbox-refresh-token Improve and Tweak behaviour for --dropbox-refresh-token Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants