Skip to content

Commit

Permalink
[#220] add missing error responses
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonny Bakker committed Sep 29, 2022
1 parent ed45b4e commit 51e7969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vng_api_common/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 51e7969

Please sign in to comment.