pub enum Error {
InvalidStatusCode(String),
InvalidRequest,
OverDailyLimit,
OverQueryLimit,
RequestDenied,
UnknownError,
ZeroResults,
}Expand description
An error produced by a Google Maps Time Zone API request.
Variants§
InvalidStatusCode(String)
Invalid status code.
Valid codes are OK, INVALID_REQUEST, OVER_DAILY_LIMIT,
OVER_QUERY_LIMIT, REQUEST_DENIED, UNKNOWN_ERROR and
ZERO_RESULTS.
InvalidRequest
Invalid request. The request was malformed.
OverDailyLimit
Over daily limit indicates that the request was denied for one or more of the following reasons:
-
The API key is missing or invalid.
-
Billing has not been enabled on your account.
-
A self-imposed usage cap has been exceeded.
-
The provided method of payment is no longer valid (for example, a credit card has expired).
In order to use Google Maps Platform products, billing must be enabled on your account, and all requests must include a valid API key. To fix this, take the following steps:
-
Enable billing on your account.
-
Adjust your usage cap to increase your daily limit (if applicable).
OverQueryLimit
Overy query limit indicates any of the following:
-
You have exceeded the QPS limits.
-
Billing has not been enabled on your account.
-
The monthly $200 credit, or a self-imposed usage cap, has been exceeded.
-
The provided method of payment is no longer valid (for example, a credit card has expired).
See the Maps FAQ for more information about how to resolve this error.
RequestDenied
Request denied by the server.
UnknownError
Unknown error from the server.
ZeroResults
Zero results indicates that no time zone data could be found for the specified position or time. Confirm that the request is for a location on land, and not over water.
Trait Implementations§
Source§impl ClassifiableError<'_, Error> for Error
impl ClassifiableError<'_, Error> for Error
Source§fn classify(&self) -> ClassifiedError<'_, Self>
fn classify(&self) -> ClassifiedError<'_, Self>
Classifies an API error as a Transient error or Permanent error.
This classification will, in turn, be used to decide whether the HTTP request should be retried or not.
Source§impl Diagnostic for Error
impl Diagnostic for Error
Source§fn code(&self) -> Option<Box<dyn Display + '_>>
fn code(&self) -> Option<Box<dyn Display + '_>>
Diagnostic. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz) is recommended, but more classic codes like
E0123 or enums will work just fine.Source§fn help(&self) -> Option<Box<dyn Display + '_>>
fn help(&self) -> Option<Box<dyn Display + '_>>
Diagnostic. Do you have any
advice for the poor soul who’s just run into this issue?Source§fn url(&self) -> Option<Box<dyn Display + '_>>
fn url(&self) -> Option<Box<dyn Display + '_>>
Diagnostic.Source§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
ReportHandlers to change the display format
of this diagnostic. Read moreSource§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Diagnostic’s Diagnostic::labels to.Source§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
Diagnostic’s Diagnostic::source_codeDiagnostics.