The following python code prints 1023 instead of 10024.
msg = b"X"*10024
lib.mongocrypt_status_set(
status, lib.MONGOCRYPT_STATUS_ERROR_CLIENT, 1, msg, -1)
msg2 = _to_string(lib.mongocrypt_status_message(status, ffi.NULL))
print(len(msg2))
It appears that mongocrypt_status_set truncates the message to 1023 bytes. I propose we document this limitation or increase the max message size.
My use case is that I want to save a python stack trace as the message. Later I want to be able to retrieve and display the full trace. 1023 is too small for a lot of failures, especially when they happen in a deeply nested function.
- is related to
-
PYTHON-1925 Add libmongocrypt cypto hooks
- Closed