Skip to content

Commit

Permalink
Merge pull request #280 from JVickery-TBS/fix/not-auth-in-view
Browse files Browse the repository at this point in the history
Catch Not Authorized in View
  • Loading branch information
amercader authored May 15, 2024
2 parents 48b5e61 + a763a5a commit 9c22b7d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ckanext/dcat/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@ def read_dataset_page(_id, _format):
try:
response = toolkit.get_action('dcat_dataset_show')({}, {'id': _id,
'format': _format, 'profiles': _profiles})
except toolkit.NotAuthorized:
toolkit.abort(403)
except toolkit.ObjectNotFound:
toolkit.abort(404)
except (toolkit.ValidationError, RDFProfileException) as e:
Expand Down

0 comments on commit 9c22b7d

Please sign in to comment.