aristanetworks/cvprac

cvprac may return an unterminated string

mtache opened this issue · 0 comments

When trying to parse the received payload from CVP, requests may fail to parse it as JSON. As a cvprac user, I would expect that an exception is raised. The current implementation catches requests.exceptions.JSONDecodeError and returns an unterminated string.
Logs when this is happening: requests.exceptions.JSONDecodeError: [Errno Unterminated string starting at] {"data": [TRUNCATED]

Error handling logic here should be modified.