UNPKG

@dolittle/sdk.projections

Version:

Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.

23 lines 1.84 kB
"use strict"; // 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.WrongKeyReceivedFromRuntime = void 0; const rudiments_1 = require("@dolittle/rudiments"); /** * The exception that gets thrown when the Runtime responds with a projection state with a wrong key when getting a single projection state from the store. */ class WrongKeyReceivedFromRuntime extends rudiments_1.Exception { /** * Initialises a new instance of the {@link WrongKeyReceivedFromRuntime} class. * @param {ProjectionId} projection - The projection identifier. * @param {ScopeId} scope - The scope identifier for the projection. * @param {Key} expectedKey - The key that was requested. * @param {string} receivedKey - The key that was received. */ constructor(projection, scope, expectedKey, receivedKey) { super(`A projection state with the wrong key was returned by the Runtime for Projection ${projection} in Scope ${scope}. Expected '${expectedKey.value}', received '${receivedKey}'`); } } exports.WrongKeyReceivedFromRuntime = WrongKeyReceivedFromRuntime; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiV3JvbmdLZXlSZWNlaXZlZEZyb21SdW50aW1lLmpzIiwic291cmNlUm9vdCI6Ii4uLyIsInNvdXJjZXMiOlsiU3RvcmUvV3JvbmdLZXlSZWNlaXZlZEZyb21SdW50aW1lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwrQ0FBK0M7QUFDL0MscUdBQXFHOzs7QUFFckcsbURBQWdEO0FBTWhEOztHQUVHO0FBQ0gsTUFBYSwyQkFBNEIsU0FBUSxxQkFBUztJQUN0RDs7Ozs7O09BTUc7SUFDSCxZQUFZLFVBQXdCLEVBQUUsS0FBYyxFQUFFLFdBQWdCLEVBQUUsV0FBbUI7UUFDdkYsS0FBSyxDQUFDLG9GQUFvRixVQUFVLGFBQWEsS0FBSyxlQUFlLFdBQVcsQ0FBQyxLQUFLLGdCQUFnQixXQUFXLEdBQUcsQ0FBQyxDQUFDO0lBQzFMLENBQUM7Q0FDSjtBQVhELGtFQVdDIn0=