postchain-client
Version:
Client library for accessing a Postchain node through REST.
37 lines • 1.47 kB
JavaScript
import { toString } from "../formatter";
export class MissingTransactionProof extends Error {
constructor(proofHash, fetchedTxHash) {
super(`Unable to verify source transaction proof,transaction hash in proof ${toString(proofHash)} does not match hash from fetched transaction ${toString(fetchedTxHash)}`);
}
}
export class DifferentNumberOfSignersException extends Error {
constructor(length, comparableLength) {
super(`Transaction signatures amount ${length} do not match expected amount of signers ${comparableLength}`);
}
}
export class SignatureException extends Error {
constructor(signer) {
super(`Expected signer ${toString(signer)} has not signed source transaction`);
}
}
export class ProofRidException extends Error {
constructor() {
super("Unable to verify source transaction proof, got a different transaction from query than we asked for");
}
}
export class SystemChainException extends Error {
constructor(errorMessage) {
super(`Query to system chain failed with error: ${errorMessage}`);
}
}
export class ConfirmationProofException extends Error {
constructor(transactionRid) {
super(`Unable to fetch confirmation proof for transaction RID: ${toString(transactionRid)}.`);
}
}
export class BlockAnchoringException extends Error {
constructor() {
super(`Block is not present in cluster anchoring chain`);
}
}
//# sourceMappingURL=error.js.map