JsonException Syntax error on /vendor/defstudio/telegraph/src/Storage/FileStorageDriver.php in json_decode at line 39
/** @phpstan-ignore-next-line */
return rescue(fn () => json_decode($json, true, flags: JSON_THROW_ON_ERROR), []);
} catch (JsonException|FileNotFoundException) {
Why is the catch block not working?
After throwing this error (into the webhook controller file) the bot didn't reply to the message, the execution stopped.
After enabling debug logs, I saw this warning:
json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in REDACTED/vendor/defstudio/telegraph/src/Storage/FileStorageDriver.php on line 39
It should be a Sentry bug... It's configured to log that exception even if it's expected.
After ignoring it from config, everything was working fine again.
In a webapp I'm developing, I found this error:
Why is the catch block not working? After throwing this error (into the webhook controller file) the bot didn't reply to the message, the execution stopped.
After enabling debug logs, I saw this warning:
This was triggered by calling