Skip to content

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

Open
@showell

Description

@showell

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions