Avoid 502 error caused by too long exception message

Created on 26 May 2022, about 2 years ago
Updated 14 February 2023, over 1 year ago

Problem/Motivation

When many plugins (~3000) of the same type are declared on the site, for example, such as blocks. And if you try to initialize a plugin that has been removed, a PluginNotFoundException will be thrown that will list all available plugins of this type. The error message will be so large that it causes a denial of service error when trying to log the message to the error log

throw new PluginNotFoundException($plugin_id, sprintf('The "%s" plugin does not exist. Valid plugin IDs for %s are: %s', $plugin_id, static::class, $valid_ids));

Proposed resolution

Lets just remove list of valid_ids plugins while error is occured.

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
PluginΒ  β†’

Last updated about 16 hours ago

Created by

πŸ‡ΊπŸ‡¦Ukraine ksemihin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024