industry-marketplace icon indicating copy to clipboard operation
industry-marketplace copied to clipboard

Better error handling in calls with wrong submodels

Open fijter opened this issue 4 years ago • 0 comments

If anything in the submodels is wrong, even just sending a '9' instead of a 9 for a double value, it will return no errors but success: false and it will log this to the node console:

CfP Error TypeError: Cannot read property 'identification' of undefined
[1]     at /home/dave/iota/industry/industry-marketplace/ServiceApp/server/build/src/utils/appHelper.js:168:70

This is not very descriptive as to what is happening; If wrong data is received by an API endpoint, for example a wrong irdi or submodel id, or a string instead of a integer it should return a descriptive error as to what went wrong to make it a lot easier to debug this.

fijter avatar Apr 09 '20 11:04 fijter