ComponentEmbedError
Thrown when a component tree breaks a rule of Discord's component embed format, or when your own code throws while
the package reads the tree. Read code to tell which. Discord doesn't report an invalid
payload. It shows the Open Graph card, or no preview at all for most payloads that break Discord's general component
rules, like a bad id.
class ComponentEmbedError extends ErrorMember visibility
Filter class members by access level.
ComponentEmbedError(
code: ComponentEmbedErrorCode,
message: string,
{ path, ...options }?,
input?: ErrorOptions & { path?: readonly string[] }
)public readonly code: ComponentEmbedErrorCodepublic readonly nameThe steps from the root to the component that broke a rule, like ['Container', 'PostCard', 'Section 2']. Your
own components appear by name. A number marks a component written next to others with the same name. The path
is empty when the problem is the whole embed, like its size. For a tree from fromPayload, the steps are
JSON keys and array indexes counted from 0, like ['component', 'components', '1'].
public readonly path: readonly string[]