DocumentReader-web-python-client
DocumentReader-web-python-client copied to clipboard
Error processing responses that do not include 'FieldName'.
Continuing the discussion from the related issue #119.
Occasionally, the response body is missing the expected 'FieldName' in the file 'webclient/gen/api_client.py' at line 123. This issue occurs right at the beginning when the request is made, before any attempt is made to read the response body. The code likely requires a try-catch statement to handle the missing field gracefully. It's also worth considering whether 'FieldName' should always be present in the response.
I tested adding a try-catch block around the code, and the error stopped occurring. I also added a print statement to log the absence of 'FieldName' when it is missing.
These errors occur in the new version of the Brazilian driver's license.