1 # Copyright 2010 Google Inc.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
19 # An error which is raised when there is an unexpected response or other
20 # transport error that prevents an operation from succeeding.
21 class TransmissionError < StandardError
23 def initialize(message = nil, result = nil)
30 # An exception that is raised if a redirect is required
32 class RedirectError < TransmissionError
36 # An exception that is raised if a method is called with missing or
37 # invalid parameter values.
38 class ValidationError < StandardError
42 # A 4xx class HTTP error occurred.
43 class ClientError < TransmissionError
47 # A 401 HTTP error occurred.
48 class AuthorizationError < ClientError
52 # A 5xx class HTTP error occurred.
53 class ServerError < TransmissionError
57 # An exception that is raised if an ID token could not be validated.
58 class InvalidIDTokenError < StandardError
61 # Error class for problems in batch requests.
62 class BatchError < StandardError