DocumentReader-web-python-client icon indicating copy to clipboard operation
DocumentReader-web-python-client copied to clipboard

Error processing responses that do not include 'FieldName'.

Open JaffeMarques opened this issue 1 year ago • 0 comments

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.

image

These errors occur in the new version of the Brazilian driver's license.

JaffeMarques avatar Sep 11 '24 16:09 JaffeMarques