[Server] Handle malformed JSON-RPC input graceful (#412)
* Never let a throwable escape Protocol::processInput() * Validate payload types in the schema hydration methods * Stop leaking handler exception messages to the client
This commit is contained in:
parent
9236824b6d
commit
c8ed07bba2
1 changed files with 858 additions and 58 deletions
|
|
@ -85,7 +85,8 @@ final class ElicitResultTest extends TestCase
|
|||
|
||||
public function testFromArrayWithInvalidAction(): void
|
||||
{
|
||||
$this->expectException(\ValueError::class);
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
$this->expectExceptionMessage('Invalid "action" value "invalid"');
|
||||
|
||||
ElicitResult::fromArray(['action' => 'invalid']);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue