Fix "no handler has been registered for serviceId='errorHandlingSrv' " (#202)

This commit is contained in:
Pavel
2022-12-12 13:44:46 +03:00
committed by GitHub
parent cf33a7b4fe
commit 1d6378d340
2 changed files with 10 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@fluencelabs/fluence",
"version": "0.27.3",
"version": "0.27.4",
"description": "TypeScript implementation of Fluence Peer",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",

View File

@@ -655,6 +655,11 @@ export class FluencePeer {
return;
}
// Do not proceed further if the particle is expired
if (item.particle.hasExpired()) {
return;
}
// Do not continue if there was an error in particle interpretation
if (item.result instanceof Error) {
log.error('Interpreter failed: ', jsonify(item.result.message));
@@ -699,6 +704,10 @@ export class FluencePeer {
particleContext: item.particle.getParticleContext(),
};
if (item.particle.hasExpired()) {
// just in case do not call any services if the particle is already expired
return;
}
this._execSingleCallRequest(req)
.catch((err): CallServiceResult => {
if (err instanceof ServiceError) {