Skip to content

Commit

Permalink
[FIX] connector_extension_extension: raise ValidationError without ra…
Browse files Browse the repository at this point in the history
…ise and jsonDecode without decoder
  • Loading branch information
KNVx committed Dec 19, 2023
1 parent 0df8e82 commit e06ac6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions connector_extension_woocommerce/components/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _exec_wcapi_call(self, op, resource, *args, **kwargs):
)
data = []
else:
ValidationError(_("Error: %s") % data)
raise ValidationError(_("Error: %s") % data)
# TODO: remove this total items and use the res.headers instead
headers = res.headers
total_items = headers.get("X-WP-Total") or 0
Expand All @@ -60,7 +60,7 @@ def _exec_wcapi_call(self, op, resource, *args, **kwargs):
}
except RequestConnectionError as e:
raise RetryableJobError(_("Error connecting to WooCommerce: %s") % e) from e
except json.JSONDecodeError as e:
except json.decoder.JSONDecodeError as e:
raise ValidationError(
_(
"Error decoding json WooCommerce response: "
Expand Down

0 comments on commit e06ac6e

Please sign in to comment.