🐛 Set proper exception type on notauthorized requests.

This commit is contained in:
Andrey Antukh 2021-01-19 11:29:56 +01:00 committed by Alonso Torres
parent 9805f8b9f2
commit af310854fc
3 changed files with 6 additions and 6 deletions

View file

@ -44,7 +44,7 @@
(when-not (or (some :can-edit rows)
(some :is-admin rows)
(some :is-owner rows))
(ex/raise :type :validation
(ex/raise :type :authorization
:code :not-authorized))))
(defn check-read-permissions!
@ -54,7 +54,7 @@
project-id profile-id])]
(when-not (seq rows)
(ex/raise :type :validation
(ex/raise :type :authorization
:code :not-authorized))))