diff --git a/vng_api_common/schema.py b/vng_api_common/schema.py index 2eb2c666..b9dbd88d 100644 --- a/vng_api_common/schema.py +++ b/vng_api_common/schema.py @@ -416,10 +416,10 @@ def _get_response_for_code( ) def get_error_codes(self): - if not hasattr(self.view, "action"): + if not hasattr(self.view, "action") and not is_search_view(self.view): return [] - action = self.view.action + action = self.view.action if not is_search_view(self.view) else "create" general_klasses = DEFAULT_ACTION_ERRORS.get(action) if general_klasses is None: