Backwards compatibility for MultiJson.
[arvados.git] / lib / google / api_client / errors.rb
1 # Copyright 2010 Google Inc.
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.
14
15
16 module Google
17   class APIClient
18     ##
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
22     end
23
24     ##
25     # An exception that is raised if a method is called with missing or
26     # invalid parameter values.
27     class ValidationError < StandardError
28     end
29
30     ##
31     # A 4xx class HTTP error occurred.
32     class ClientError < TransmissionError
33     end
34
35     ##
36     # A 5xx class HTTP error occurred.
37     class ServerError < TransmissionError
38     end
39
40     ##
41     # An exception that is raised if an ID token could not be validated.
42     class InvalidIDTokenError < StandardError
43     end
44
45     # Error class for problems in batch requests.
46     class BatchError < StandardError
47     end
48   end
49 end