mirror of
https://github.com/elyby/accounts.git
synced 2025-01-10 22:12:03 +05:30
Fixes ACCOUNTS-3. Add extended logging for further investigation
This commit is contained in:
parent
c86817a93d
commit
4ee77636dc
@ -36,6 +36,19 @@ class RequestParser implements RequestParserInterface {
|
|||||||
$parser = Yii::createObject(JsonParser::class);
|
$parser = Yii::createObject(JsonParser::class);
|
||||||
$parser->throwException = false;
|
$parser->throwException = false;
|
||||||
$result = $parser->parse($rawBody, $contentType);
|
$result = $parser->parse($rawBody, $contentType);
|
||||||
|
if (is_string($result)) {
|
||||||
|
Yii::$app->sentry->captureMessage('Received an empty $result from the parser', [
|
||||||
|
'inputText' => $rawBody,
|
||||||
|
'inputTextLength' => mb_strlen($rawBody),
|
||||||
|
'outputText' => $result,
|
||||||
|
'contentType' => $contentType,
|
||||||
|
], [
|
||||||
|
'level' => 'warning',
|
||||||
|
]);
|
||||||
|
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($result)) {
|
if (!empty($result)) {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user