Skip to content

Commit 873f4f6

Browse files
feat: improve invalid resource messages
1 parent 8f8af90 commit 873f4f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Schema/Resource.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ public function __construct(
6868
public readonly ?array $meta = null,
6969
) {
7070
if (!preg_match(self::RESOURCE_NAME_PATTERN, $name)) {
71-
throw new InvalidArgumentException('Invalid resource name: must contain only alphanumeric characters, underscores, and hyphens.');
71+
throw new InvalidArgumentException('Invalid resource name "'.$name.'": must contain only alphanumeric characters, underscores, and hyphens.');
7272
}
7373
if (!preg_match(self::URI_PATTERN, $uri)) {
74-
throw new InvalidArgumentException('Invalid resource URI: must be a valid URI with a scheme and optional path.');
74+
throw new InvalidArgumentException('Invalid resource URI: "'.$uri.'"must be a valid URI with a scheme and optional path.');
7575
}
7676
}
7777

0 commit comments

Comments
 (0)