aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/comments/commentsplugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/comments/commentsplugin.php')
-rw-r--r--apps/dav/lib/comments/commentsplugin.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/dav/lib/comments/commentsplugin.php b/apps/dav/lib/comments/commentsplugin.php
index 56d94cc33e9..7abf6e71ee5 100644
--- a/apps/dav/lib/comments/commentsplugin.php
+++ b/apps/dav/lib/comments/commentsplugin.php
@@ -242,6 +242,9 @@ class CommentsPlugin extends ServerPlugin {
return $comment;
} catch (\InvalidArgumentException $e) {
throw new BadRequest('Invalid input values', 0, $e);
+ } catch (\OCP\Comments\MessageTooLongException $e) {
+ $msg = 'Message exceeds allowed character limit of ';
+ throw new BadRequest($msg . \OCP\Comments\IComment::MAX_MESSAGE_LENGTH, 0, $e);
}
}