@@ -68,11 +68,12 @@ async def _get_base_url(self) -> str:
68
68
raise RoborockUrlException ("get url by email returned None" )
69
69
response_code = response .get ("code" )
70
70
if response_code != 200 :
71
+ _LOGGER .info ("Get base url failed for %s with the following context: %s" , self ._username , response )
71
72
if response_code == 2003 :
72
73
raise RoborockInvalidEmail ("Your email was incorrectly formatted." )
73
74
elif response_code == 1001 :
74
75
raise RoborockMissingParameters (
75
- "You are missing parameters for this request, are you sure you " " entered your username?"
76
+ "You are missing parameters for this request, are you sure you entered your username?"
76
77
)
77
78
elif response_code == 9002 :
78
79
raise RoborockTooManyRequest ("Please temporarily disable making requests and try again later." )
@@ -214,6 +215,7 @@ async def request_code(self) -> None:
214
215
raise RoborockException ("Failed to get a response from send email code" )
215
216
response_code = code_response .get ("code" )
216
217
if response_code != 200 :
218
+ _LOGGER .info ("Request code failed for %s with the following context: %s" , self ._username , code_response )
217
219
if response_code == 2008 :
218
220
raise RoborockAccountDoesNotExist ("Account does not exist - check your login and try again." )
219
221
elif response_code == 9002 :
@@ -243,6 +245,7 @@ async def pass_login(self, password: str) -> UserData:
243
245
if login_response is None :
244
246
raise RoborockException ("Login response is none" )
245
247
if login_response .get ("code" ) != 200 :
248
+ _LOGGER .info ("Login failed for %s with the following context: %s" , self ._username , login_response )
246
249
raise RoborockException (f"{ login_response .get ('msg' )} - response code: { login_response .get ('code' )} " )
247
250
user_data = login_response .get ("data" )
248
251
if not isinstance (user_data , dict ):
@@ -282,6 +285,7 @@ async def code_login(self, code: int | str) -> UserData:
282
285
raise RoborockException ("Login request response is None" )
283
286
response_code = login_response .get ("code" )
284
287
if response_code != 200 :
288
+ _LOGGER .info ("Login failed for %s with the following context: %s" , self ._username , login_response )
285
289
if response_code == 2018 :
286
290
raise RoborockInvalidCode ("Invalid code - check your code and try again." )
287
291
if response_code == 3009 :
@@ -308,6 +312,7 @@ async def _get_home_id(self, user_data: UserData):
308
312
if home_id_response is None :
309
313
raise RoborockException ("home_id_response is None" )
310
314
if home_id_response .get ("code" ) != 200 :
315
+ _LOGGER .info ("Get Home Id failed with the following context: %s" , home_id_response )
311
316
if home_id_response .get ("code" ) == 2010 :
312
317
raise RoborockInvalidCredentials (
313
318
f"Invalid credentials ({ home_id_response .get ('msg' )} ) - check your login and try again."
0 commit comments