+ // TRANS: Client error displayed exceeding the maximum notice length.
+ // TRANS: %d is the maximum lenth for a notice.
+ $msg = _m('Maximum notice size is %d character, including attachment URL.',
+ 'Maximum notice size is %d characters, including attachment URL.',
+ Notice::maxContent());
+ /* Use HTTP 413 error code (Request Entity Too Large)
+ * instead of basic 400 for better understanding
+ */
+ $this->clientError(sprintf($msg, Notice::maxContent()), 413);