Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

[WIP] DAPH-180 Fix CustomJsonTest and register all Symfony's error handlers in a new CommonUtils\Sirius\Logging\ErrorHandling class #12

Merged
merged 5 commits into from
Sep 18, 2017

Conversation

vitorbrandao
Copy link
Contributor

Signed-off-by: Vítor Brandão vitor@noiselabs.io

Signed-off-by: Vítor Brandão <vitor@noiselabs.io>
@vitorbrandao vitorbrandao changed the title DAPH-180 Fix CustomJsonTest [WIP] DAPH-180 Fix CustomJsonTest Sep 14, 2017
…irius\Logging\ErrorHandling class

Signed-off-by: Vítor Brandão <vitor@noiselabs.io>
Module.php Outdated
//global catchall to log when a 400 or 500 error message is set on a response.
//This is mainly for logging purposes.
$eventManager->attach(
MvcEvent::EVENT_FINISH,
function ($e) use ($logger, $extractor) {
function ($e) use ($logger, $extractor, $serviceManager) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logger is used; yet you pull from the service manager further down?

…ctions

Signed-off-by: Vítor Brandão <vitor@noiselabs.io>
Signed-off-by: Vítor Brandão <vitor@noiselabs.io>
@vitorbrandao vitorbrandao changed the title [WIP] DAPH-180 Fix CustomJsonTest [WIP] DAPH-180 Fix CustomJsonTest and register all Symfony's error handlers in a new CommonUtils\Sirius\Logging\ErrorHandling class Sep 18, 2017
'category' => 'Event',
)
);
$logger->warn('Response: ' . $statusCode . '[' . $e->getResponse() . ']', ['category' => 'Event']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might this log sensitive information?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might. However, there are no functional changes introduced in this PR, this is merely a cosmetic change.

composer.json Outdated
"zendframework/zendframework": "2.*",
"psr/log": "^1.0"
"psr/log": "^1.0",
"symfony/debug": ">=2.6",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you put an upper bound on this constraint?

@@ -2,23 +2,10 @@

namespace CommonUtils\Sirius\Logging;

use Zend\Db\TableGateway\Exception\RuntimeException;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the code was using a RuntimeException could it be pre-fixed with a ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RuntimeException isn't being used in this class. Safe to remove.

Signed-off-by: Vítor Brandão <vitor@noiselabs.io>
@carnage carnage merged commit d3c522c into master Sep 18, 2017
@vitorbrandao vitorbrandao deleted the DAPH-180-catch-all-error-handler--pr2 branch September 18, 2017 15:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants