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

api: Give quicker feedback if your credentials are wrong #533

Open
showell opened this issue Jan 29, 2020 · 33 comments
Open

api: Give quicker feedback if your credentials are wrong #533

showell opened this issue Jan 29, 2020 · 33 comments

Comments

@showell
Copy link
Contributor

showell commented Jan 29, 2020

When you use the api and instantiate a Client, it will succeed as long as the credentials are well-formed, even if the credentials aren't actually valid. Of course, as soon as you try to use them, you'll get a proper error, but it might make sense to have some kind of "ping" method that you can call that literally just makes sure you can connect to the server, so that program can handle that error immediately before starting real work.

More discussion here:

https://chat.zulip.org/#narrow/stream/127-integrations/topic/python.20client/near/813065

Even though this might be a quick fix in terms of the amount of code, I recommend that you work on this only after you've worked with the API a bit and have a feel for the use cases. A big part of this issue is figuring out the strategy that makes the most sense here.

We'll also want to improve the docs here to reflect any new methods we add or best practices we decide to recommend.

@Kushal-kothari
Copy link
Collaborator

@zulipbot claim

@zulipbot
Copy link
Member

Welcome to Zulip, @Kushal-kothari! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

@Kushal-kothari
Copy link
Collaborator

Kushal-kothari commented Feb 23, 2020

@showell . Am I on the correct path to interpret this issue Eg: whenever a user try to use an api for some random reason "x" (let say to create a bot and get it integrated).
After adding the wrong credentials lets say (incorrect email id / incorrect token) we need a method handler that checks and give the feedback that the entered credentials are valid or not immediately and not after the whole process.

@zulipbot
Copy link
Member

zulipbot commented Mar 4, 2020

Hello @Kushal-kothari, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting @zulipbot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

@Kushal-kothari
Copy link
Collaborator

@zulipbot claim

@zulipbot
Copy link
Member

zulipbot commented Mar 21, 2020

Hello @Kushal-kothari, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting @zulipbot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

@TAM360
Copy link

TAM360 commented Apr 14, 2020

@zulipbot claim

@zulipbot
Copy link
Member

Welcome to Zulip, @TAM360! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

@zulipbot
Copy link
Member

zulipbot commented Apr 24, 2020

Hello @TAM360, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting @zulipbot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

@TAM360
Copy link

TAM360 commented Apr 24, 2020

@zulipbot I am currently working on this issue.

@zulipbot
Copy link
Member

zulipbot commented May 8, 2020

ERROR: You have not claimed this issue to work on yet.

@Pradhvan
Copy link

@zulipbot claim

@zulipbot
Copy link
Member

Welcome to Zulip, @Pradhvan! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

@QEDK
Copy link
Collaborator

QEDK commented Sep 19, 2020

I think #592 is attempting to address this.

@showell
Copy link
Contributor Author

showell commented Sep 19, 2020

#592 has been abandoned, so somebody should feel free to work on this, ideally after looking at that PR to see how much of it is headed in the right direction.

@QEDK
Copy link
Collaborator

QEDK commented Sep 19, 2020

@zulipbot claim

@zulipbot
Copy link
Member

Welcome to Zulip, @QEDK! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

@zulipbot
Copy link
Member

zulipbot commented Sep 29, 2020

Hello @QEDK, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting @zulipbot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

@QEDK
Copy link
Collaborator

QEDK commented Sep 29, 2020

Just been setting up my new environment in WSL, back at this! 🚀

@showell
Copy link
Contributor Author

showell commented Oct 6, 2020

One thing to clarify--if the API has the wrong credentials, we should probably throw an exception, and not use sys.exit(1) or similar, since it's plausible that the calling code will simply want to handle the exception and move on.

We should take care to provide useful messaging to standard output, however, since 90% of use cases are probably people who are clearly just dealing with some kind of confusing configuration situation.

@dmarar
Copy link

dmarar commented Nov 19, 2020

@zulipbot claim

@vinitwadgaonkar
Copy link
Collaborator

@zulipbot claim

@vinitwadgaonkar
Copy link
Collaborator

please assign this issue to me

@vinitwadgaonkar
Copy link
Collaborator

@zulipbot claim

@zulipbot
Copy link
Member

Hello @vinitwadgaonkar, it looks like you've currently claimed 1 issue in this repository. We encourage new contributors to focus their efforts on at most 1 issue at a time, so please complete your work on your other claimed issues before trying to claim this issue again.

We look forward to your valuable contributions!

@kamalbuilds
Copy link

@zulipbot claim

@zulipbot
Copy link
Member

zulipbot commented Feb 9, 2022

Welcome to Zulip, @legendarykamal! We just sent you an invite to collaborate on this repository at https://github.com/zulip/python-zulip-api/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

@zulipbot
Copy link
Member

zulipbot commented Feb 19, 2022

Hello @legendarykamal, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting @zulipbot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

@codewithnick
Copy link

@zulipbot claim

@zulipbot
Copy link
Member

Hello @codewithnick!

Thanks for your interest in Zulip! You have attempted to claim an issue without the label "help wanted". You can only claim and submit pull requests for issues with the help wanted label.

If this is your first time here, we recommend reading our guide for new contributors before getting started.

@codewithnick
Copy link

@showell can you add help wanted tag here so I can contribute to this issue , thanks

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

Successfully merging a pull request may close this issue.