UNPKG

@metamask/kernel-errors

Version:
36 lines 1.69 kB
import { BaseError } from "../BaseError.mjs"; import type { ErrorOptionsWithStack, MarshaledOcapError } from "../types.mjs"; export declare class SubclusterNotFoundError extends BaseError { constructor(subclusterId: string, options?: ErrorOptionsWithStack); /** * A superstruct struct for validating marshaled {@link SubclusterNotFoundError} instances. */ static struct: import("@metamask/superstruct").Struct<{ "@@MARSHALED_ERROR": true; code: "SUBCLUSTER_NOT_FOUND"; data: { subclusterId: string; }; message: string; stack?: string | undefined; }, { code: import("@metamask/superstruct").Struct<"SUBCLUSTER_NOT_FOUND", "SUBCLUSTER_NOT_FOUND">; data: import("@metamask/superstruct").Struct<{ subclusterId: string; }, { subclusterId: import("@metamask/superstruct").Struct<string, null>; }>; "@@MARSHALED_ERROR": import("@metamask/superstruct").Struct<true, true>; message: import("@metamask/superstruct").Struct<string, null>; stack: import("@metamask/superstruct").Struct<string | undefined, null>; }>; /** * Unmarshals a {@link MarshaledError} into a {@link SubclusterNotFoundError}. * * @param marshaledError - The marshaled error to unmarshal. * @param unmarshalErrorOptions - The function to unmarshal the error options. * @returns The unmarshaled error. */ static unmarshal(marshaledError: MarshaledOcapError, unmarshalErrorOptions: (marshaledError: MarshaledOcapError) => ErrorOptionsWithStack): SubclusterNotFoundError; } //# sourceMappingURL=SubclusterNotFoundError.d.mts.map