Fixes ACCOUNTS-3. Add extended logging for further investigation

This commit is contained in:
ErickSkrauch 2020-06-13 00:39:02 +03:00
parent c86817a93d
commit 4ee77636dc
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E

View File

@ -36,6 +36,19 @@ class RequestParser implements RequestParserInterface {
$parser = Yii::createObject(JsonParser::class);
$parser->throwException = false;
$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)) {
return $result;
}