diff --git a/openlibrary/plugins/importapi/code.py b/openlibrary/plugins/importapi/code.py index fb8219cfafd..9f54fed29e4 100644 --- a/openlibrary/plugins/importapi/code.py +++ b/openlibrary/plugins/importapi/code.py @@ -145,6 +145,10 @@ def POST(self): return self.error('missing-required-field', str(e)) except ClientException as e: return self.error('bad-request', **json.loads(e.json)) + except TypeError as e: + return self.error('type-error', repr(e)) + except Exception as e: + return self.error('unhandled-exception', repr(e)) def raise_non_book_marc(marc_record, **kwargs):