scimserviceprovider/lib/Middleware/ErrorMiddleware.php

17 lines
411 B
PHP
Raw Permalink Normal View History

2024-02-06 10:32:35 +00:00
<?php
declare(strict_types=1);
namespace OCA\SCIMServiceProvider\Middleware;
use Exception;
use OCA\SCIMServiceProvider\Responses\SCIMErrorResponse;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Middleware;
class ErrorMiddleware extends Middleware {
public function afterException(Controller $controller, string $methodName, Exception $exception) {
return new SCIMErrorResponse($exception);
}
}