mirror of
https://github.com/elyby/accounts.git
synced 2024-11-09 15:02:19 +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->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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user