Skip to content

Commit

Permalink
Make sure that internal_error_message is used during ErrorHandler ini…
Browse files Browse the repository at this point in the history
…tialization

Third argument for `Overblog\GraphQLBundle\Error\ErrorHandler` is the default
message to use when an error happen. As described in the documentation
`overblog_graphql.errors_handler.internal_error_message` can be used to set a
custom message.
  • Loading branch information
ferrastas committed Jan 6, 2021
1 parent 78a921e commit d56b0c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/DependencyInjection/OverblogGraphQLExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ private function setErrorHandler(array $config, ContainerBuilder $container): vo

$container->register(ErrorHandler::class)
->setArgument(0, new Reference(EventDispatcherInterface::class))
->setArgument(1, new Reference(ExceptionConverterInterface::class));
->setArgument(1, new Reference(ExceptionConverterInterface::class))
->setArgument(2, $config['errors_handler']['internal_error_message']);

$container->register(ErrorHandlerListener::class)
->setArgument(0, new Reference(ErrorHandler::class))
Expand Down

0 comments on commit d56b0c2

Please sign in to comment.