python-zulip-api
python-zulip-api copied to clipboard
api: Give quicker feedback if your credentials are wrong
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.
@zulipbot claim
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:
- Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
- Unwatch this repository, so that you don't get 100 emails a day.
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)!
@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.
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!
@zulipbot claim
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!
@zulipbot claim
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:
- Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
- Unwatch this repository, so that you don't get 100 emails a day.
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)!
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!
@zulipbot I am currently working on this issue.
ERROR: You have not claimed this issue to work on yet.
@zulipbot claim
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:
- Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
- Unwatch this repository, so that you don't get 100 emails a day.
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)!
Hello @Pradhvan, 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!
I am starting to work on it now. 😄
I think #592 is attempting to address this.
#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.
@zulipbot claim
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:
- Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
- Unwatch this repository, so that you don't get 100 emails a day.
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)!
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!
Just been setting up my new environment in WSL, back at this! 🚀
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.
@zulipbot claim
@zulipbot claim
please assign this issue to me
@zulipbot claim
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!
@zulipbot claim
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:
- Join me on the Zulip developers' server, to get help, chat about this issue, and meet the other developers.
- Unwatch this repository, so that you don't get 100 emails a day.
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)!
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!