Hi at all! I am trying to disable debug output in ...
# docker
m
Hi at all! I am trying to disable debug output in case of an error for the GlueApi to hide stacktrace and other sensible information for productive environments. If i set
Copy code
docker:
 debug:
   enabled:false
followed by booting the env and restarting it, it still shows the stacktrace in case of a 500 internal server error for example. Whats the trick?
p
m
Thank you @purple-coat-90835! I already set this to false (to be sure in each and every config) but i still see debug output in case of an error. I tested it with requesting a glue endpoint via postman.
a
This debug setting isn't about exceptions vs rendered error page. Please check these settings:
Copy code
FailWhale
$config[ErrorHandlerConstants::ERROR_RENDERER] = WebHtmlErrorRenderer::class;




Exception
$config[ErrorHandlerConstants::DISPLAY_ERRORS] = true;
$config[ErrorHandlerConstants::ERROR_RENDERER] = WebExceptionErrorRenderer::class;
m
Hey @average-branch-45579! Thank you. Yes, it works for Zed and Yves, but not for Glue
a
What would you expect in return for glue if backend fails with 500?
m
Something without information about the underlying system
I am fine with "an error occured". Or a json with a hint that an error occured
a
Is it reproducible in the demo shop? I would then create an internal ticket for glue team. PS. Sorry, misread the start post and missed that this is about glue.
m
I will check it in the demo shop and drop you a message later šŸ™‚ Thank you!
Hey @average-branch-45579! I did a fresh setup of the b2c demoshop (https://github.com/spryker-shop/b2c-demo-shop) and it seems not to behave different. What I did: in
config/Shared/config_default-docker.dev.php
I set the following values
Copy code
$config[ApplicationConstants::ENABLE_APPLICATION_DEBUG]
    = $config[ShopApplicationConstants::ENABLE_APPLICATION_DEBUG]
    = false;

$config[GlueApplicationConstants::GLUE_APPLICATION_REST_DEBUG] = false;

$config[ErrorHandlerConstants::DISPLAY_ERRORS] = false;
$config[ErrorHandlerConstants::ERROR_RENDERER] = WebHtmlErrorRenderer::class;
$config[ErrorHandlerConstants::IS_PRETTY_ERROR_HANDLER_ENABLED] = false;
and I forced an error in both GlueBootstrap.php and YvesBootstrap.php by instantiating a not existing class
new Foo();
What Yves (correctly) did: • showing the FailWhale What Glue did:
Copy code
Error - Exception: Class 'Spryker\Glue\GlueApplication\Bootstrap\Foo' not found 
in /data/vendor/spryker/glue-application/src/Spryker/Glue/GlueApplication/Bootstrap/AbstractGlueBootstrap.php (48)

Request URI: /return-reasons

Trace: 
#0 /data/public/Glue/index.php(17): Spryker\Glue\GlueApplication\Bootstrap\AbstractGlueBootstrap->__construct()
#1 {main}
What I expect Glue has to do: • showing some information that an error occured • not showing information about the underlying system
šŸ‘ 1
a
Thanks! I'll clarify internally and create a ticket for them when I have time, not immidiately. In case you want to be notified once it's done, please create a support request as well so we have an official communication about it.
m
Thank you Valerii!
šŸ‘ 1
a
Hi @mysterious-pencil-76046! The problem should have been fixed. Please check this release group and pay attention to poject level changes - https://api.release.spryker.com/release-group/3796.
m
Awesome! Thank you @average-branch-45579! I will test it!
šŸ‘ 1
Works! Thx!
šŸŽ‰ 1