Skip to content

@loontail/minecraft-kit v0.8.14 / MinecraftKitErrorContext

Type alias: MinecraftKitErrorContext

ts
type MinecraftKitErrorContext: {
[key: string]: unknown;   actualHash: string;
  actualSize: number;
  exitCode: number;
  expectedHash: string;
  expectedSize: number;
  filePath: string;
  httpStatus: number;
  platform: string;
  url: string;
  version: string;
};

Structured context attached to errors. Always safe to serialize via JSON.stringify.

Example

ts
if (isMinecraftKitError(e)) {
  const ctx: MinecraftKitErrorContext = e.context;
  logger.error("install failed", { code: e.code, url: ctx.url, status: ctx.httpStatus });
}

Index signature

[key: string]: unknown

Type declaration

MemberType
actualHashstring
actualSizenumber
exitCodenumber
expectedHashstring
expectedSizenumber
filePathstring
httpStatusnumber
platformstring
urlstring
versionstring

Source

src/types/errors.ts:86

MIT License