We're not checking content encoding, which can lead to a 500. Here's the simplest way to reproduce.
from lexy_py import LexyClient
lx = LexyClient()
lx.add_documents([
{'content': '\x00'}
])
On the client, this results in LexyAPIError: 500 Internal Server Error. On the server, it results in the following:
sqlalchemy.exc.DBAPIError: (sqlalchemy.dialects.postgresql.asyncpg.Error)
<class 'asyncpg.exceptions.CharacterNotInRepertoireError'>: invalid byte sequence for encoding "UTF8": 0x00
(Background on this error at: https://sqlalche.me/e/14/dbapi)
We're not checking content encoding, which can lead to a 500. Here's the simplest way to reproduce.
On the client, this results in
LexyAPIError: 500 Internal Server Error. On the server, it results in the following: