Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

How do we know if the limit was exceeded (license expired / account locked) on the response #27

Open
barrytheunissen opened this issue Jun 3, 2018 · 1 comment

Comments

@barrytheunissen
Copy link

After calling GetWeatherDataAsync for example, what property can we check to see if Dark Sky rejected the request because the account was locked out (limit exceeded) for example.

@jcheng31
Copy link
Owner

jcheng31 commented Jun 4, 2018

Right now there isn't a definite way to know for sure - if the request had a non-successful status code, an exception is raised. There's also a ApiCallsMade property on the instance of the service which lets you see how many calls have been made so far (as reported by Dark Sky), though you'd have to implement some logic to figure out if you're nearing a limit using that.

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

No branches or pull requests

2 participants