database: fix decode exception handler

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-04-19 10:59:38 -04:00
parent 65946ef857
commit 4be8e2e72f
No known key found for this signature in database
GPG Key ID: 7027245FBBDDF59A
1 changed files with 2 additions and 1 deletions

View File

@ -689,8 +689,9 @@ class MoonrakerDatabase:
decode_func = RECORD_DECODE_FUNCS[fmt] decode_func = RECORD_DECODE_FUNCS[fmt]
return decode_func(bvalue) return decode_func(bvalue)
except Exception: except Exception:
val = bytes(bvalue).decode()
raise self.server.error( raise self.server.error(
f"Error decoding value {bvalue.decode()}, format: {chr(fmt)}") f"Error decoding value {val}, format: {chr(fmt)}")
async def _handle_list_request(self, async def _handle_list_request(self,
web_request: WebRequest web_request: WebRequest