@@ -211,6 +211,18 @@ def __init__(self, message, cause, http_response):
211
211
exceptions .AlreadyExistsError .__init__ (self , message , cause , http_response )
212
212
213
213
214
+ class InsufficientPermissionError (exceptions .PermissionDeniedError ):
215
+ """The credential used to initialize the SDK lacks required permissions."""
216
+
217
+ default_message = ('The credential used to initialize the SDK has insufficient '
218
+ 'permissions to perform the requested operation. See '
219
+ 'https://firebase.google.com/docs/admin/setup for details '
220
+ 'on how to initialize the Admin SDK with appropriate permissions' )
221
+
222
+ def __init__ (self , message , cause , http_response ):
223
+ exceptions .PermissionDeniedError .__init__ (self , message , cause , http_response )
224
+
225
+
214
226
class InvalidDynamicLinkDomainError (exceptions .InvalidArgumentError ):
215
227
"""Dynamic link domain in ActionCodeSettings is not authorized."""
216
228
@@ -258,6 +270,7 @@ def __init__(self, message, cause=None, http_response=None):
258
270
'DUPLICATE_EMAIL' : EmailAlreadyExistsError ,
259
271
'DUPLICATE_LOCAL_ID' : UidAlreadyExistsError ,
260
272
'EMAIL_EXISTS' : EmailAlreadyExistsError ,
273
+ 'INSUFFICIENT_PERMISSION' : InsufficientPermissionError ,
261
274
'INVALID_DYNAMIC_LINK_DOMAIN' : InvalidDynamicLinkDomainError ,
262
275
'INVALID_ID_TOKEN' : InvalidIdTokenError ,
263
276
'PHONE_NUMBER_EXISTS' : PhoneNumberAlreadyExistsError ,
0 commit comments