Moved BadRequestException checks to middleware, removed uneeded unit tests in BoardApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
This commit is contained in:
committed by
Julius Härtl
parent
8cac183af6
commit
d33dd3e0fc
@@ -24,6 +24,7 @@
|
||||
namespace OCA\Deck\Middleware;
|
||||
|
||||
use OCA\Deck\StatusException;
|
||||
use OCA\Deck\BadRequestException;
|
||||
use OCP\AppFramework\Middleware;
|
||||
use OCP\AppFramework\Http\JSONResponse;
|
||||
use OCP\ILogger;
|
||||
@@ -59,7 +60,7 @@ class SharingMiddleware extends Middleware {
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function afterException($controller, $methodName, \Exception $exception) {
|
||||
if ($exception instanceof StatusException) {
|
||||
if ($exception instanceof StatusException || $exception instanceof BadRequestException) {
|
||||
if ($this->config->getSystemValue('loglevel', Util::WARN) === Util::DEBUG) {
|
||||
$this->logger->logException($exception);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user