Skip to content
This repository was archived by the owner on Jun 20, 2025. It is now read-only.

Conversation

@tudorpintea999
Copy link

@tudorpintea999 tudorpintea999 commented Nov 3, 2023

Hello, I added an error handling there

Error Handling in getAddressForNetwork:

The getAddressForNetwork function does not handle the error object provided by fs.readFile. If an error occurs (e.g., the file does not exist or there are permission issues), it should be handled properly, and the promise should be rejected.
The check if (content == undefined) should also check for null and should ideally use the strict equality operator ===. However, this check should be part of the error handling for the error object.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant