wagtail-nest / wagtail-airtable

Airtable import and export support for Wagtail pages and Django models.
BSD 3-Clause "New" or "Revised" License
49 stars 15 forks source link

Index error on error handling due to updated Airtable error messaging. #38

Open bmoe872 opened 2 years ago

bmoe872 commented 2 years ago

I think Airtable updated how they are handling errors, as we recently started getting problems on this line:

error_json = error.split("[Error: ")[1].rstrip("]")

Which is found in wagtail_airtable/mixins.py

The error above is coming in as:

'422 Client Error: Unprocessable Entity for url: https://api.airtable.com/v0/<base_name>/<table_name>'

Which is different from how the error messages used to come, which included brackets that the error was splitting on.