Seldaek/monolog · error · InvalidArgumentException
Unknown parseMode, use one of these: {}.
Error message
Unknown parseMode, use one of these: {}. What it means
Error "Unknown parseMode, use one of these: {}." thrown in Seldaek/monolog.
Source
Thrown at src/Monolog/Handler/TelegramBotHandler.php:143
parent::__construct($level, $bubble);
$this->apiKey = $apiKey;
$this->channel = $channel;
$this->setParseMode($parseMode);
$this->disableWebPagePreview($disableWebPagePreview);
$this->disableNotification($disableNotification);
$this->splitLongMessages($splitLongMessages);
$this->delayBetweenMessages($delayBetweenMessages);
$this->setTopic($topic);
}
/**
* @return $this
*/
public function setParseMode(string|null $parseMode = null): self
{
if ($parseMode !== null && !\in_array($parseMode, self::AVAILABLE_PARSE_MODES, true)) {
throw new \InvalidArgumentException('Unknown parseMode, use one of these: ' . implode(', ', self::AVAILABLE_PARSE_MODES) . '.');
}
$this->parseMode = $parseMode;
return $this;
}
/**
* @return $this
*/
public function disableWebPagePreview(bool|null $disableWebPagePreview = null): self
{
$this->disableWebPagePreview = $disableWebPagePreview;
return $this;
}
/**View on GitHub (pinned to 57eb102834)
When it happens
Trigger: Thrown at src/Monolog/Handler/TelegramBotHandler.php:143 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Seldaek/monolog@57eb102834 (2026-08-17).
Data as JSON: /api/errors/9b7e8de858fde212.
Report an issue: GitHub.