fairDataSociety / fdp-contracts

Fair Data Protocol smart contracts and its utilities
4 stars 1 forks source link

Avoiding logging errors #62

Closed IgorShadurin closed 2 years ago

IgorShadurin commented 2 years ago

Here is a line of code with logging an error

https://github.com/fairDataSociety/fdp-contracts/blob/5275614a003d907517340b6ce96b3080659875fb/js-library/src/services/ens.ts#L138

While testing the operation of the ENS library with fdp-storage, I cover various cases with tests, including a case with a lack of balance during registration.

This logging adds red text with errors to the test log, giving the impression that the tests were not successful. Not sure if this is good practice. It may be worth avoiding this method.

Screenshot 2022-07-13 at 13 15 51