@book000/pixivts - v0.61.1
    Preparing search index...

    Class PixivFetchError

    An Error subclass that wraps a PixivError for use in thrown contexts (e.g. async generators that must throw proper Error objects).

    All PixivError properties are spread directly onto this instance so that callers can use instanceof PixivFetchError or access error.type etc.

    try {
    for await (const page of result.pages()) { ... }
    } catch (e) {
    if (e instanceof PixivFetchError) {
    console.error(e.pixivError.type)
    }
    }

    Hierarchy

    • Error
      • PixivFetchError
    Index

    Constructors

    Properties

    cause?: unknown
    message: string
    name: string
    pixivError: PixivError

    The underlying structured PixivError.

    stack?: string