Some of the functions catch errors, print information to the console and then throw the error, while others do not catch and print any information. E.g. see getPlantAsset vs deletePlantAsset. This inconsistency should be resolved by simply allowing any errors that are thrown by the operation to propagate up to where they can be better handled in more context sensitive ways (e.g. lib.js can print error messages).
Note: the logging in runTransaction should remain in place.
All existing unit and e2e tests should still pass after this change.
Some of the functions catch errors, print information to the console and then throw the error, while others do not catch and print any information. E.g. see
getPlantAsset
vsdeletePlantAsset
. This inconsistency should be resolved by simply allowing any errors that are thrown by the operation to propagate up to where they can be better handled in more context sensitive ways (e.g.lib.js
can print error messages).Note: the logging in
runTransaction
should remain in place.All existing unit and e2e tests should still pass after this change.