Summary:
Intermittedly on a cache miss the value returned from the cache implementation is undefined.
This is a weird edge case or bug because value should never be undefined, fetchParticipant should be called and value should be populated.
If fetchParticipant failed that should be an error object and the code would rethrow participant not found, server error, etc.
Severity:
(Low, Medium, High)
Priority:
(Critical, Medium, Low)
Expected Behavior
value should always be defined, but barring a fix, adding in a conditional to throw a proper error instead of a type error.
Steps to Reproduce
Undetermined
Specifications
Component (if known):
Version:
Platform:
Subsystem:
Type of testing:
Bug found/raised by:
Notes:
ml-core-test-harness with ALS v15.2.3 when running GP after onboarding, rarely happens.
"TypeError: Cannot read properties of undefined (reading 'errorInformation')\n at exports.getParticipant (/opt/app/node_modules/@mojaloop/central-services-shared/src/util/participants.js:130:21)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async exports.validateParticipant (/opt/app/src/models/participantEndpoint/facade.js:135:18)\n at async Object.postParticipants (/opt/app/src/domain/participants/participants.js:285:41)"
Summary: Intermittedly on a cache miss the value returned from the cache implementation is
undefined
. This is a weird edge case or bug because value should never beundefined
, fetchParticipant should be called andvalue
should be populated.If fetchParticipant failed that should be an error object and the code would rethrow participant not found, server error, etc.
Severity: (Low, Medium, High)
Priority: (Critical, Medium, Low)
Expected Behavior
value
should always be defined, but barring a fix, adding in a conditional to throw a proper error instead of a type error.Steps to Reproduce
Specifications
Notes:
ml-core-test-harness with ALS v15.2.3 when running GP after onboarding, rarely happens.
<img width="720" src="https:
//api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBNnhCQkE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--b285227cb8e8beafc341d70c9ba11e8366fda778/image_720.png" alt="image_720.png" />