The original AxiosError is returned and then managed and logged by the makeApiProblem with the new branch I added.
For example, here's what happens in the logs if I don't catch the 404 when getting an agreement by id i.e., removing the .catch from the promise:
Case where the API GW throws its own error, no errors are caught
Draft agreement case
Here no error is caught, but the agreement not found is thrown logging the root cause i.e., that the agreement is Draft
1st part of IMN-736
Case where a 404 is caught
When the error is not caught
The original
AxiosError
is returned and then managed and logged by themakeApiProblem
with the new branch I added. For example, here's what happens in the logs if I don't catch the404
when getting an agreement by id i.e., removing the.catch
from the promise:Case where the API GW throws its own error, no errors are caught
Draft agreement case
Here no error is caught, but the agreement not found is thrown logging the root cause i.e., that the agreement is Draft