1515# This file is part of the LoginRadius SDK #
1616# package. #
1717#################################################
18+
19+
1820class LoginRadiusExceptions (Exception ):
1921 """
2022 This is the base for all LoginRadius Exceptions. Makes dealing with exceptions easy!
@@ -46,7 +48,7 @@ def __init__(self, version):
4648
4749 def __str__ (self ):
4850 return "LoginRadius needs at least requests 2.0, found: " \
49- + self .version + "\n Please upgrade to the latest version."
51+ + self .version + "\n Please upgrade to the latest version."
5052
5153 class InvalidLibrary (LoginRadiusExceptions ):
5254 """
@@ -71,7 +73,7 @@ def __init__(self, version):
7173
7274 def __str__ (self ):
7375 return "No API_SECRET set. Please initialize a API_SECRET first.\n " \
74- + "ie. LoginRadius.API_SECRET = \" Really_Secret_Key\" "
76+ + "ie. LoginRadius.API_SECRET = \" Really_Secret_Key\" "
7577
7678 class NoAPIKey (LoginRadiusExceptions ):
7779 """
@@ -84,7 +86,7 @@ def __init__(self, version):
8486
8587 def __str__ (self ):
8688 return "No API_KEY set. Please initialize a APP_KEY first.\n " \
87- + "ie. LoginRadius.API_Key = \" Really_Application_Key\" "
89+ + "ie. LoginRadius.API_Key = \" Really_Application_Key\" "
8890
8991 class MissingJsonResponseParameter (LoginRadiusExceptions ):
9092 """
@@ -108,6 +110,7 @@ class TokenExpired(LoginRadiusExceptions):
108110 """
109111 Raised if the request cannot be completed because the access token has expired.
110112 """
113+
111114 def __init__ (self , time ):
112115 self .time = time
113116
@@ -119,17 +122,19 @@ class FeatureNotSupported(LoginRadiusExceptions):
119122 """
120123 Raised if the request cannot be completed because your account/API access does not include this.
121124 """
125+
122126 def __init__ (self ):
123127 pass
124128
125129 def __str__ (self ):
126- return "Your LoginRadius site doesn't have permission to access this endpoint, please contact " + \
127- "LoginRadius support if you need more information."
130+ return "Your LoginRadius site doesn't have permission to access this endpoint, please contact " + \
131+ "LoginRadius support if you need more information."
128132
129133 class UnknownJsonError (LoginRadiusExceptions ):
130134 """
131135 Raised if cannot determine error number from Json
132136 """
137+
133138 def __init__ (self , result ):
134139 self .result = result
135140
@@ -140,6 +145,7 @@ class APIKeyInvalid(LoginRadiusExceptions):
140145 """
141146 Raised if you entered your API wrong, or not at all.
142147 """
148+
143149 def __init__ (self ):
144150 pass
145151
@@ -150,6 +156,7 @@ class APISecretInvalid(LoginRadiusExceptions):
150156 """
151157 Raised if you your API Secret is invalid.
152158 """
159+
153160 def __init__ (self ):
154161 pass
155162
@@ -160,6 +167,7 @@ class InvalidRequestToken(LoginRadiusExceptions):
160167 """
161168 Raised if you your request token is invalid from the POST request.
162169 """
170+
163171 def __init__ (self ):
164172 pass
165173
@@ -170,6 +178,7 @@ class RequestTokenExpired(LoginRadiusExceptions):
170178 """
171179 Raised if you your request token has expired from the POST request.
172180 """
181+
173182 def __init__ (self ):
174183 pass
175184
@@ -180,6 +189,7 @@ class InvalidAccessToken(LoginRadiusExceptions):
180189 """
181190 Raised if you access token is invalid.
182191 """
192+
183193 def __init__ (self ):
184194 pass
185195
@@ -190,6 +200,7 @@ class ParameterMissing(LoginRadiusExceptions):
190200 """
191201 Raised if a parameter in the GET or POST request is missing.
192202 """
203+
193204 def __init__ (self ):
194205 pass
195206
@@ -200,6 +211,7 @@ class ParameterNotFormatted(LoginRadiusExceptions):
200211 """
201212 Raised if a parameter in the GET or POST request is not formatted properly for the provider.
202213 """
214+
203215 def __init__ (self ):
204216 pass
205217
@@ -210,9 +222,10 @@ class EndPointNotSupported(LoginRadiusExceptions):
210222 """
211223 Raised if a the endpoint is not supported by the provider which correlates to the token.
212224 """
225+
213226 def __init__ (self ):
214227 pass
215228
216229 def __str__ (self ):
217230 return "The requested endpoint is not supported by the current ID provider, " + \
218- "please check the API support page at http://www.loginradius.com/datapoints"
231+ "please check the API support page at http://www.loginradius.com/datapoints"
0 commit comments