Handle status_code / status error in HTTP response
Checks for the existence of either 'status_code'
'status_int', or 'status' in the HTTP response object,
instantiating the HTTPException instance with the found
code, or raises a generic Exception if not found.
Test Plan:
PASS:
Tested code on system exhibiting the errors
referenced in the bug. The HTTP response is now
correctly caught and the correct HTTPException is
raised.
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/845790 /opendev. org/starlingx/ config/ commit/ edd548d8c165ac1 3d148c2c5d560bd 098e345cc3
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit edd548d8c165ac1 3d148c2c5d560bd 098e345cc3
Author: Kyle MacLeod <email address hidden>
Date: Mon Jun 13 15:35:02 2022 -0400
Handle status_code / status error in HTTP response
Checks for the existence of either 'status_code'
'status_int', or 'status' in the HTTP response object,
instantiating the HTTPException instance with the found
code, or raises a generic Exception if not found.
Test Plan:
PASS:
Tested code on system exhibiting the errors
referenced in the bug. The HTTP response is now
correctly caught and the correct HTTPException is
raised.
Closes-Bug: 1978499
Signed-off-by: Kyle MacLeod <email address hidden> e4f6713a838fe33 04d362f1756
Change-Id: I53d1dd6583368d