distcloud/distributedcloud/dcmanager/common
Karla Felix b056a514c8 Ignore JSON decode error in request log.
For DELETE requests with no request body or "Content-Length" field, the
expected return value for "hasattr(rest_state.request, 'json')" would be
False and for "rest_state.request.json" would be an empty string.
Instead, what occurs is that both "hasattr(rest_state.request, 'json')"
and "rest_state.request.json" are throwing JSON decode exceptions in
this case. This change adds tolerance for this exception. This is done
because it is not known all the possible request conditions that may
cause this exception to be thrown.

Test Plan:

PASS:  Send a delete request through the CLI to subcloud-group and
       verify if any exception shows up dcmanager-api logs.

Closes-Bug: 1999901
Change-Id: I58af3f4711d6caf840e188fb4690f2bde219d79a
Signed-off-by: Karla Felix <karla.karolinenogueirafelix@windriver.com>
2022-12-19 14:07:41 +00:00
..
__init__.py Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
config.py Add timeout for prestage ansible playbooks 2022-05-09 20:58:47 +00:00
consts.py Merge "Enhance error reporting on subcloud upgrade" 2022-12-07 14:17:15 +00:00
context.py Ignore JSON decode error in request log. 2022-12-19 14:07:41 +00:00
exceptions.py Enhance error reporting on subcloud upgrade 2022-12-06 11:56:51 -03:00
i18n.py Remove standard WR License notice from StarlingX distributedcloud 2021-12-23 19:55:09 +00:00
manager.py Remove standard WR License notice from StarlingX distributedcloud 2021-12-23 19:55:09 +00:00
messaging.py Increase RPC client timeout for subcloud backup delete 2022-11-21 21:07:51 +00:00
prestage.py Change prestage preparation completed file directory on Debian 2022-10-07 21:18:28 +00:00
scheduler.py Remove standard WR License notice from StarlingX distributedcloud 2021-12-23 19:55:09 +00:00
serializer.py Minor Code Change Based on Py39 Pylint Feedback 2022-08-10 13:12:24 -04:00
utils.py Add CA certificate transfer state to DC upgrade orchestration 2022-12-01 14:18:36 -05:00
version.py Remove standard WR License notice from StarlingX distributedcloud 2021-12-23 19:55:09 +00:00