Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/google/cloud/exceptions/__init__.py: 100%
31 statements
« prev ^ index » next coverage.py v7.3.2, created at 2023-12-08 06:45 +0000
« prev ^ index » next coverage.py v7.3.2, created at 2023-12-08 06:45 +0000
1# Copyright 2014 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# http://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.
15# pylint: disable=invalid-name
16# pylint recognizies all of these aliases as constants and thinks they have
17# invalid names.
19"""Custom exceptions for :mod:`google.cloud` package."""
21# Avoid the grpc and google.cloud.grpc collision.
22from __future__ import absolute_import
24from google.api_core import exceptions
26try:
27 from grpc._channel import _Rendezvous
28except ImportError: # pragma: NO COVER
29 _Rendezvous = None
31GrpcRendezvous = _Rendezvous
32"""Exception class raised by gRPC stable."""
34# Aliases to moved classes.
35GoogleCloudError = exceptions.GoogleAPICallError
36Redirection = exceptions.Redirection
37MovedPermanently = exceptions.MovedPermanently
38NotModified = exceptions.NotModified
39TemporaryRedirect = exceptions.TemporaryRedirect
40ResumeIncomplete = exceptions.ResumeIncomplete
41ClientError = exceptions.ClientError
42BadRequest = exceptions.BadRequest
43Unauthorized = exceptions.Unauthorized
44Forbidden = exceptions.Forbidden
45NotFound = exceptions.NotFound
46MethodNotAllowed = exceptions.MethodNotAllowed
47Conflict = exceptions.Conflict
48LengthRequired = exceptions.LengthRequired
49PreconditionFailed = exceptions.PreconditionFailed
50RequestRangeNotSatisfiable = exceptions.RequestRangeNotSatisfiable
51TooManyRequests = exceptions.TooManyRequests
52ServerError = exceptions.ServerError
53InternalServerError = exceptions.InternalServerError
54MethodNotImplemented = exceptions.MethodNotImplemented
55BadGateway = exceptions.BadGateway
56ServiceUnavailable = exceptions.ServiceUnavailable
57GatewayTimeout = exceptions.GatewayTimeout
58from_http_status = exceptions.from_http_status
59from_http_response = exceptions.from_http_response