odoo/odoo#201089

Created by fw-bot
Merged at 99676290b1dcb32f1d8778c4dba326503b2008c7

Statuses:

label
odoo-dev:18.0-16.0-fix-iap-jsonrpc-error-handling-lba-421780-fw
head
891d00e4dd7f62bf29c69d5095f25d3f09293a30
merged
7 months ago by iAP, Louis Baudoux (lba)
odoo/odoo
16.0 #199286
17.0 #200948
saas-17.4 #201083
18.0 #201089
saas-18.1 #201284
saas-18.2 #201301
saas-18.3
saas-18.4
19.0
master #201324

[FW][FIX] iap: fix error handling of `iap_jsonrpc`

This commit fixes the following issues:
- Only re-raise InsufficientCreditError from IAP. UserError, AccessError and ReadTimeout shouldn't be re-raised, they should considered as an internal error of the IAP server.
- Instead of raising a requests.exceptions.ConnectionError in case of an unknown error from IAP (which didn't make much sense), it will now raise a IAPServerError
- The logging level has been changed from exception to warning. There is indeed no useful information in the logged traceback as the interesting part is in the traceback on the IAP server logs.

Forward-Port-Of: #200948
Forward-Port-Of: #199286