google_cloud_gax/
error.rs

1// Copyright 2024 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15mod core_error;
16pub use core_error::*;
17mod credentials;
18pub use credentials::CredentialsError;
19
20/// Errors and error details related to local path validation.
21///
22/// These errors occur when required fields in a request are either missing, or
23/// are present, but in an invalid format. The client fails these requests
24/// locally because it does not know how to send such requests.
25pub mod binding;
26
27/// Errors and error details returned by Service RPCs.
28///
29/// The Google Cloud Client Libraries for Rust distinguishes between errors
30/// detected while trying to send a RPC (e.g. cannot open a connection), errors
31/// trying to receive a response (e.g. the connection is dropped before the full
32/// response), and errors returned by the service itself.
33///
34/// The types in this module represent detailed information returned by the
35/// Google Cloud services.
36///
37/// # Examples
38///
39/// ```
40/// # use std::result::Result;
41/// # use google_cloud_gax::error;
42/// use error::Error;
43/// use error::rpc::Status;
44/// fn handle_error(e: Error) {
45///     if let Some(status) = e.status() {
46///         println!("the service reported {status:?}")
47///     }
48/// }
49/// ```
50pub mod rpc;