public abstract class DegreeDaysApiException
extends java.lang.RuntimeException
Subclasses of this exception are thrown by all the methods accessible through
DegreeDaysApi
to indicate problems like
network failure,
service failure (our server-side
processing going wrong), a rate limit being
reached, invalid authentication
credentials, and other types of exception that are specific to the API
operation in question.
The likelyhood of many of these exceptions occurring will depend on how you
are using the API. For example, if your customers install your application
and then enter their own API access
keys into it, you might expect the odd InvalidRequestException
because of typos. However, such an exception would be less likely to occur if
your application was a centrally-running background process that used a
single API account to collect data. And consequently you might be less likely
to want to handle InvalidRequestException
explicitly.
This is an unchecked exception (a subclass of RuntimeException
),
so you don't need to handle it explicitly each time you call a
method that can throw it (or a subclass of it). A typical approach would be
to catch just those subclasses that you're interested in (if any), catching
DegreeDaysApiException
last as a kind of catch all, or just
letting any unhandled exceptions bubble up the call stack. We made this an
unchecked exception to give you more flexibilty in how you choose to handle
it and its subclasses.
See www.degreedays.net/api/ for more about the Degree Days.net API.
You can sign up for a Degree Days.net API account and read the integration guide that is useful and applicable whether you are using Java or not.