stellar-plus
Version:
beta version of stellar-plus, an all-in-one sdk for the Stellar blockchain
31 lines (30 loc) • 1.47 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DHHError = exports.DefaultHorizonHandlerErrorCodes = void 0;
const error_1 = require("../../stellar-plus/error");
var DefaultHorizonHandlerErrorCodes;
(function (DefaultHorizonHandlerErrorCodes) {
// CE0 General
DefaultHorizonHandlerErrorCodes["DHH001"] = "DHH001";
DefaultHorizonHandlerErrorCodes["DHH002"] = "DHH002";
})(DefaultHorizonHandlerErrorCodes || (exports.DefaultHorizonHandlerErrorCodes = DefaultHorizonHandlerErrorCodes = {}));
const missingHorizonUrl = () => {
return new error_1.StellarPlusError({
code: DefaultHorizonHandlerErrorCodes.DHH001,
message: 'Missing Horizon Url!',
source: 'Default Horizon Handler',
details: 'The Default Horizon Handler requires an Horizon Url to be defined in the network configuration. Review the network configuration object provided and make sure it has url to connect directly with the Horizon API.',
});
};
const failedToLoadAccount = () => {
return new error_1.StellarPlusError({
code: DefaultHorizonHandlerErrorCodes.DHH002,
message: 'Failed to load account from Horizon server.',
source: 'Default Horizon Handler',
details: 'Failed to load account from Horizon server. An unexpected error occurred while trying to load the account from the Horizon server.',
});
};
exports.DHHError = {
missingHorizonUrl,
failedToLoadAccount,
};