scimserviceprovider/lib/Responses/SCIMErrorResponse.php

23 lines
420 B
PHP
Raw Permalink Normal View History

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-02 10:21:25 +00:00
*/
class SCIMErrorResponse extends SCIMJSONResponse {
2024-02-06 10:32:35 +00:00
public function __construct(Exception $e) {
$data = [
'schemas' => ['urn:ietf:params:scim:api:messages:2.0:Error'],
2024-02-06 10:32:35 +00:00
'detail' => $e->getMessage(),
'scimType' => '',
2024-02-06 10:32:35 +00:00
'status' => $e->getCode(),
];
2024-02-06 10:32:35 +00:00
parent::__construct($data, $e->getCode());
2022-05-02 10:21:25 +00:00
}
}