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

HTTP Response Code 401 means Unauthorized #6

Open
ClifHouck opened this issue Oct 10, 2016 · 4 comments
Open

HTTP Response Code 401 means Unauthorized #6

ClifHouck opened this issue Oct 10, 2016 · 4 comments

Comments

@ClifHouck
Copy link

Based on the HTTP protocol, a status code of 401 means an unauthorized request was made. However, somecomfort seems to interpret this code to mean the client is being rate-limited by Honeywell's server. I ran into this when I typo-d my password. Seems counter-intuitive to immediately assume 401 means rate-limiting is happening.

@ClifHouck ClifHouck changed the title HTTP Response Code 401 means Unauthorized, HTTP Response Code 401 means Unauthorized Oct 10, 2016
@ClifHouck
Copy link
Author

@kk7ds
Copy link
Owner

kk7ds commented Oct 10, 2016

Definitely agree it's counter-intuitive, but that behavior is based on my experience with it in practice. Their API is really not well-behaved in any way, and they pretty much return 401 for just about everything. Since you can sometimes get a 401 just because you hit something (even like the KeepAlive) too quickly, and then shortly thereafter continue to use the API with the same credentials, it's really hard to tell a useful difference between responses :/

@ClifHouck
Copy link
Author

ClifHouck commented Oct 10, 2016

Understandable. Wish Honeywell would actually create an official publicly consumable API for their thermostats.

Maybe update/change the exception thrown to call out the ambiguous way Honeywell uses 401?

@JerryWorkman
Copy link

The exception message is more descriptive but not accurate. "somecomfort.client.APIRateLimited: You are being rate-limited. Try waiting a bit." Yet I can login with a web browser after that.

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

3 participants