Skip to content

Commit 0451396

Browse files
authored
Merge pull request #870 from olsavmic/patch-1
Fix error handler configuration example
2 parents c19e226 + 16b6664 commit 0451396

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/error-handling/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ You can custom the default errors handler using configuration:
140140
overblog_graphql:
141141
errors_handler:
142142
enabled: true # false will totally disabled errors handling
143-
internal_error_message: ~ # custom generic error message
143+
internal_error_message: 'Internal error occured' # custom generic error message
144144
rethrow_internal_exceptions: false # re-throw internal exception
145145
debug: false # will add trace stack and debugMessage to error
146146
log: true # false will disabled the default logging behavior

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ private function errorsHandlerSection(): ArrayNodeDefinition
9292
->addDefaultsIfNotSet()
9393
->children()
9494
->booleanNode('enabled')->defaultTrue()->end()
95-
->scalarNode('internal_error_message')->defaultValue(ErrorHandler::DEFAULT_ERROR_MESSAGE)->end()
95+
->scalarNode('internal_error_message')->defaultValue(ErrorHandler::DEFAULT_ERROR_MESSAGE)->cannotBeEmpty()->end()
9696
->booleanNode('rethrow_internal_exceptions')->defaultFalse()->end()
9797
->booleanNode('debug')->defaultValue($this->debug)->end()
9898
->booleanNode('log')->defaultTrue()->end()

0 commit comments

Comments
 (0)