2022-05-02 10:21:25 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace OCA\SCIMServiceProvider\Responses;
|
|
|
|
|
2024-02-06 10:32:35 +00:00
|
|
|
use Exception;
|
2022-05-02 10:21:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class SCIMErrorResponse
|
2022-05-18 14:28:05 +00:00
|
|
|
*
|
2022-05-02 10:21:25 +00:00
|
|
|
*/
|
|
|
|
class SCIMErrorResponse extends SCIMJSONResponse {
|
|
|
|
|
2024-02-06 10:32:35 +00:00
|
|
|
public function __construct(Exception $e) {
|
|
|
|
$data = [
|
2022-05-18 14:28:05 +00:00
|
|
|
'schemas' => ['urn:ietf:params:scim:api:messages:2.0:Error'],
|
2024-02-06 10:32:35 +00:00
|
|
|
'detail' => $e->getMessage(),
|
2022-05-18 14:28:05 +00:00
|
|
|
'scimType' => '',
|
2024-02-06 10:32:35 +00:00
|
|
|
'status' => $e->getCode(),
|
2022-05-18 14:28:05 +00:00
|
|
|
];
|
2024-02-06 10:32:35 +00:00
|
|
|
parent::__construct($data, $e->getCode());
|
2022-05-02 10:21:25 +00:00
|
|
|
}
|
2022-05-18 14:28:05 +00:00
|
|
|
}
|