What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi at all! I am trying to disable debug output in case of an error for the GlueApi to hide stacktrac
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
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?
Comments
-
You can check your config for \Spryker\Shared\ErrorHandler\ErrorHandlerConstants::IS_PRETTY_ERROR_HANDLER_ENABLED and \Spryker\Shared\GlueApplication\GlueApplicationConstants::GLUE_APPLICATION_REST_DEBUG
Both should be false for non-dev environments.0 -
Thank you @UKHR9UN00! 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.
0 -
This debug setting isn't about exceptions vs rendered error page.
Please check these settings:
FailWhale $config[ErrorHandlerConstants::ERROR_RENDERER] = WebHtmlErrorRenderer::class; Exception $config[ErrorHandlerConstants::DISPLAY_ERRORS] = true; $config[ErrorHandlerConstants::ERROR_RENDERER] = WebExceptionErrorRenderer::class;
0 -
Hey @valerii.trots! Thank you. Yes, it works for Zed and Yves, but not for Glue
0 -
What would you expect in return for glue if backend fails with 500?
0 -
Something without information about the underlying system
0 -
I am fine with "an error occured". Or a json with a hint that an error occured
0 -
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.
0 -
I will check it in the demo shop and drop you a message later π Thank you!
0 -
Hey @valerii.trots!
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$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: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 system0 -
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.0 -
Thank you Valerii!
0 -
Hi @UPPB2H525! 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.
0 -
Awesome! Thank you @valerii.trots! I will test it!
0 -
Works! Thx!
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random