summaryrefslogtreecommitdiffstats
path: root/application/service
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2020-04-19 13:48:22 +0200
committerFlorian Pritz <bluewind@xinu.at>2020-04-19 13:55:45 +0200
commit4bc1a611da7776f22f2cfeee8e472038b7d8673c (patch)
tree4fc79ad617a28cf8780138a91f1079cfe6337054 /application/service
parentac934ca94370f5204319f88eef0a7747fe7e133a (diff)
Reclassify various exceptions as InsufficientPermissionsException
That way they get the correct HTTP status code and they also get ignored by the logging code. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/service')
-rw-r--r--application/service/user.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/application/service/user.php b/application/service/user.php
index 336941ca4..1d678106a 100644
--- a/application/service/user.php
+++ b/application/service/user.php
@@ -93,7 +93,7 @@ class user {
->count_all_results();
if ($invitations + 1 > $CI->config->item('max_invitation_keys')) {
- throw new \exceptions\PublicApiException("user/invitation-limit", "You can't create more invitation keys at this time.");
+ throw new \exceptions\InsufficientPermissionsException("user/invitation-limit", "You can't create more invitation keys at this time.");
}
$key = random_alphanum(12, 16);