File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ def check_errors(keywords, *path):
161161 return error
162162 return None
163163
164- if check_errors (["AUTHENTICATION_ERROR" ], "extensions" , "exception" ,
164+ if check_errors (["AUTHENTICATION_ERROR" ], "extensions" ,
165165 "code" ) is not None :
166166 raise labelbox .exceptions .AuthenticationError ("Invalid API key" )
167167
@@ -173,6 +173,7 @@ def check_errors(keywords, *path):
173173
174174 validation_error = check_errors (["GRAPHQL_VALIDATION_FAILED" ],
175175 "extensions" , "code" )
176+
176177 if validation_error is not None :
177178 message = validation_error ["message" ]
178179 if message == "Query complexity limit exceeded" :
@@ -193,8 +194,7 @@ def check_errors(keywords, *path):
193194 raise labelbox .exceptions .ApiLimitError (response_msg )
194195
195196 resource_not_found_error = check_errors (["RESOURCE_NOT_FOUND" ],
196- "extensions" , "exception" ,
197- "code" )
197+ "extensions" , "code" )
198198 if resource_not_found_error is not None :
199199 # Return None and let the caller methods raise an exception
200200 # as they already know which resource type and ID was requested
You can’t perform that action at this time.
0 commit comments