Classdiscord-component-embedv0.4.1
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 drops an invalid payload and falls back to the Open Graph card. The card you see is your only signal.
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[]