[FIX] partner_autocomplete: change logger type to warning

An error occurs while attempting to connect the IAP server,
The problem seems like the IAP server was down, This error is generated and
subsequently caught by a sentry.

Error: Autocomplete API error: The url that this service requested returned an
error. Please contact the author of the app. The url it tried to contact
was `https://partner-autocomplete.odoo.com/iap/partner_autocomplete/enrich`

To handle this issue, we have changed the logger error to warning.

sentry-3930839889

closes odoo/odoo#128706

X-original-commit: a5cc90262ea36c332ce5aaa78c003f63d444565b
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
This commit is contained in:
Om Rabara
2023-07-17 13:30:46 +02:00
parent be67de9aa6
commit c01f7cdac8
@@ -42,7 +42,7 @@ class IapAutocompleteEnrichAPI(models.AbstractModel):
except exceptions.ValidationError:
return False, 'Insufficient Credit'
except (ConnectionError, HTTPError, exceptions.AccessError, exceptions.UserError) as exception:
_logger.error('Autocomplete API error: %s', str(exception))
_logger.warning('Autocomplete API error: %s', str(exception))
return False, str(exception)
except iap_tools.InsufficientCreditError as exception:
_logger.warning('Insufficient Credits for Autocomplete Service: %s', str(exception))