Closed cubap closed 5 months ago
https://github.com/CenterForDigitalHumanities/TinyNode/blob/dcacf574d7dd61c21ce89e3b51edd3c1c8ad6585/tokens.js#L16-L17
This try is the whole function. We can already catch() the errors on the fetch() so we don't need the whole thing wrapped. The fs.readfile() callback could also be used for specific errors, but the second try-catch may be fine.
try
fs.readfile()
https://github.com/CenterForDigitalHumanities/TinyNode/blob/dcacf574d7dd61c21ce89e3b51edd3c1c8ad6585/tokens.js#L16-L17
This
try
is the whole function. We can already catch() the errors on the fetch() so we don't need the whole thing wrapped. Thefs.readfile()
callback could also be used for specific errors, but the second try-catch may be fine.