diff --git a/Controller/GraphQL/InvalidUserPasswordException.php b/Controller/GraphQL/InvalidUserPasswordException.php index 48bdbbc..4e59071 100644 --- a/Controller/GraphQL/InvalidUserPasswordException.php +++ b/Controller/GraphQL/InvalidUserPasswordException.php @@ -10,6 +10,6 @@ class InvalidUserPasswordException extends GraphQLException { public static function create(Exception $previous = null): self { - return new self('The provided user / password is incorrect.', 401, $previous, 'Security'); + return new self('The provided user / password is incorrect.', 401, $previous); } } diff --git a/Tests/Fixtures/Controller/TestGraphqlController.php b/Tests/Fixtures/Controller/TestGraphqlController.php index 17c5ba0..e802162 100644 --- a/Tests/Fixtures/Controller/TestGraphqlController.php +++ b/Tests/Fixtures/Controller/TestGraphqlController.php @@ -81,7 +81,7 @@ public function triggerException(int $code = 0): string public function triggerAggregateException(): string { $exception1 = new GraphQLException('foo', 401); - $exception2 = new GraphQLException('bar', 404, null, 'MyCat', ['field' => 'baz', 'category' => 'MyCat']); + $exception2 = new GraphQLException('bar', 404, null, ['field' => 'baz']); throw new GraphQLAggregateException([$exception1, $exception2]); } diff --git a/Tests/FunctionalTest.php b/Tests/FunctionalTest.php index 896485f..8d3fa33 100644 --- a/Tests/FunctionalTest.php +++ b/Tests/FunctionalTest.php @@ -153,7 +153,6 @@ public function testExceptionHandler(): void $this->assertSame('foo', $result['errors'][0]['message']); $this->assertSame('bar', $result['errors'][1]['message']); - $this->assertSame('MyCat', $result['errors'][1]['extensions']['category']); $this->assertSame('baz', $result['errors'][1]['extensions']['field']); } @@ -463,7 +462,6 @@ public function testValidation(): void $this->assertSame('This value is not a valid email address.', $errors[0]['message']); $this->assertSame('email', $errors[0]['extensions']['field']); - $this->assertSame('Validate', $errors[0]['extensions']['category']); } public function testWithIntrospection(): void