The code that was iterating over unexpected errors would
accidentally 'return' rather than raise the error during
the area where it extracts a reason from the exception.
This meant that if the API returned an internal error (500)
the code would mistakenly treat the result as a None response.
This was particularly troublesome when performing GET operations.
Now it reports the error and allows the exception to be raised.
Test Plan:
PASS: Verify the CLI reports an error when invoked while the API
is beng restarted.
PASS: Verify the CLI returns a valid value when invoked under
normal circumstances.
PASS: Verify the API reports an error rather than None when a
strategy is queried during an API restart.
Reviewed: https:/ /review. opendev. org/c/starlingx /nfv/+/ 817115 /opendev. org/starlingx/ nfv/commit/ 515c22944d93695 623e78cb610ce55 728329218d
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 515c22944d93695 623e78cb610ce55 728329218d
Author: albailey <email address hidden>
Date: Mon Nov 8 15:50:21 2021 -0600
Propagate unexpected errors from nfv client
The code that was iterating over unexpected errors would
accidentally 'return' rather than raise the error during
the area where it extracts a reason from the exception.
This meant that if the API returned an internal error (500)
the code would mistakenly treat the result as a None response.
This was particularly troublesome when performing GET operations.
Now it reports the error and allows the exception to be raised.
Test Plan:
PASS: Verify the CLI reports an error when invoked while the API
is beng restarted.
PASS: Verify the CLI returns a valid value when invoked under
normal circumstances.
PASS: Verify the API reports an error rather than None when a
strategy is queried during an API restart.
Closes-Bug: 1950207 edabf2e6e4914ae bc013da3cf4
Signed-off-by: albailey <email address hidden>
Change-Id: I7dc62b28425f09