File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -222,20 +222,21 @@ async def process_request(
222222 except ValueError :
223223 _LOGGER .warning ("Non JSON response: %s" , message )
224224
225+ error = await resp .text ()
226+
225227 if resp .status == 400 :
226228 _LOGGER .error ("Error 400: %s" , message ["msg" ])
227229 raise ParseJSONError
228230 if resp .status == 401 :
229- error = await resp .text ()
230231 _LOGGER .error ("Authentication error: %s" , error )
231232 raise AuthenticationError
232233 if resp .status == 404 :
233- _LOGGER .error ("%s" , message [ "msg" ] )
234+ _LOGGER .error ("%s" , error )
234235 raise UnknownError
235236 if resp .status == 405 :
236- _LOGGER .error ("%s" , message [ "msg" ] )
237+ _LOGGER .error ("%s" , error )
237238 elif resp .status == 500 :
238- _LOGGER .error ("%s" , message [ "msg" ] )
239+ _LOGGER .error ("%s" , error )
239240
240241 return message
241242
Original file line number Diff line number Diff line change 55
66PROJECT_DIR = Path (__file__ ).parent .resolve ()
77README_FILE = PROJECT_DIR / "README.md"
8- VERSION = "0.1.32 "
8+ VERSION = "0.1.33 "
99
1010setup (
1111 name = "python-openevse-http" ,
You can’t perform that action at this time.
0 commit comments