@arkiv-network/sdk
Version:
TypeScript client library for Arkiv's blockchains interactions
41 lines (39 loc) • 1.53 kB
JavaScript
import { t as ACCESS_KEYS_URL } from "./consts-Lp55G1Qc.js";
//#region src/errors.ts
var EntityMutationError = class extends Error {
txHash;
constructor(message, options) {
super(message, { cause: options?.cause });
this.name = "EntityMutationError";
this.txHash = options?.txHash;
}
};
var NoEntityFoundError = class extends Error {
/** The key that matched nothing, when the lookup was by key. */
entityKey;
constructor(entityKey) {
super(entityKey === void 0 ? "No entity found" : `No live entity with key ${entityKey}. It was never created, or it has been deleted or has expired.`);
this.name = "NoEntityFoundError";
this.entityKey = entityKey;
}
};
var EmptyPatchError = class extends Error {
entityKey;
constructor(entityKey) {
super(`The patch for entity ${entityKey} has nothing to apply. Pass "set" to write columns, or "unset" to remove optional ones.`);
this.name = "EmptyPatchError";
this.entityKey = entityKey;
}
};
var MissingAccessKeyError = class extends Error {
/** The chain that was asked for without a key. */
chain;
constructor(chain) {
super(`${chain} needs an Arkiv access key: pass it as ${chain.toLowerCase()}({ accessKey }). Get a free one at ${ACCESS_KEYS_URL}, or pass accessKey: "" to use the heavily rate-limited public endpoint.`);
this.name = "MissingAccessKeyError";
this.chain = chain;
}
};
//#endregion
export { NoEntityFoundError as i, EntityMutationError as n, MissingAccessKeyError as r, EmptyPatchError as t };
//# sourceMappingURL=errors-CmOg0Na9.js.map