File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,10 @@ class SCIMException extends Exception
12
12
13
13
protected $ errors = [];
14
14
15
- public function __construct ($ message )
15
+ public function __construct ($ message, $ code = 404 )
16
16
{
17
- parent ::__construct ($ message );
17
+ parent ::__construct ($ message , $ code );
18
+ $ this ->setCode ($ code );
18
19
}
19
20
20
21
public function setScimType ($ scimType ) : SCIMException
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public function toJson($options = 0)
19
19
"schemas " => ['urn:ietf:params:scim:api:messages:2.0:Error ' ],
20
20
"detail " => $ this ->detail ,
21
21
"status " => $ this ->status ,
22
- "scimType " => ($ this ->status == 400 ? $ this ->scimType : null ),
22
+ "scimType " => ($ this ->status == 400 ? $ this ->scimType : ( $ this -> status == 409 ? ' uniqueness ' : null ) ),
23
23
24
24
// not defined in SCIM 2.0
25
25
'errors ' => $ this ->errors
You can’t perform that action at this time.
0 commit comments