NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
42 stars 27 forks source link

Remove console.logs and improve try/catch through the whole repo #2500

Open alonakos opened 2 months ago

alonakos commented 2 months ago

Describe the bug Through the code base, there are numerous console.log statements within the try/catch block. See the example here.

We would like to handle error catch more gracefully than the console. logging the error statement, and avoid using console.log in production code. We can also remove the try/catch where they are redundant and keep them where useful.

Expected behavior Clean the code to handle errors gracefully.

robyngit commented 2 months ago

Extra context: avoiding console.log in our production code is part transitioning our codebase to use the airbnb style guide, see CONTRIBUTING - linting.