@dolittle/sdk.services
Version:
Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.
26 lines • 1.88 kB
JavaScript
;
// Copyright (c) Dolittle. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.CouldNotConnectToRuntime = void 0;
const rudiments_1 = require("@dolittle/rudiments");
/**
* Exception that gets thrown when the a the connection to the Runtime could not be established.
*/
class CouldNotConnectToRuntime extends rudiments_1.Exception {
/**
* Initializes a new instance of {@link CouldNotConnectToRuntime}.
* @param {string} address - The address of the Runtime that was connected to.
*/
constructor(address) {
super(`Could not connect to a Runtime on '${CouldNotConnectToRuntime.getStrippedAddress(address)}'. Please make sure a Runtime is running, and that the private port (usually 50053) is accessible on the specified port.`);
}
static getStrippedAddress(address) {
if (address.startsWith('dns:')) {
return address.slice(4);
}
return address;
}
}
exports.CouldNotConnectToRuntime = CouldNotConnectToRuntime;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ291bGROb3RDb25uZWN0VG9SdW50aW1lLmpzIiwic291cmNlUm9vdCI6Ii4uLyIsInNvdXJjZXMiOlsiQ291bGROb3RDb25uZWN0VG9SdW50aW1lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwrQ0FBK0M7QUFDL0MscUdBQXFHOzs7QUFFckcsbURBQWdEO0FBRWhEOztHQUVHO0FBQ0gsTUFBYSx3QkFBeUIsU0FBUSxxQkFBUztJQUVuRDs7O09BR0c7SUFDSCxZQUFZLE9BQWU7UUFDdkIsS0FBSyxDQUFDLHNDQUFzQyx3QkFBd0IsQ0FBQyxrQkFBa0IsQ0FBQyxPQUFPLENBQUMsMEhBQTBILENBQUMsQ0FBQztJQUNoTyxDQUFDO0lBRU8sTUFBTSxDQUFDLGtCQUFrQixDQUFDLE9BQWU7UUFDN0MsSUFBSSxPQUFPLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxFQUFFO1lBQzVCLE9BQU8sT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztTQUMzQjtRQUNELE9BQU8sT0FBTyxDQUFDO0lBQ25CLENBQUM7Q0FDSjtBQWhCRCw0REFnQkMifQ==