Skip to content

Commit 2e78f05

Browse files
committed
DefaultError
1 parent 2b4ca77 commit 2e78f05

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace WebServCo\JSONAPI\DataTransfer\Errors;
6+
7+
use WebServCo\JSONAPI\Contract\Errors\ErrorInterface;
8+
9+
final readonly class DefaultError implements ErrorInterface
10+
{
11+
public function __construct(
12+
// Not a mistake, status should be a string: https://jsonapi.org/format/#errors
13+
public string $status,
14+
public string $title,
15+
public string $detail,
16+
) {
17+
}
18+
}

0 commit comments

Comments
 (0)