Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dangerous try / catch all in lodestar-db #2139

Closed
dapplion opened this issue Mar 7, 2021 · 1 comment · Fixed by #2173
Closed

Dangerous try / catch all in lodestar-db #2139

dapplion opened this issue Mar 7, 2021 · 1 comment · Fixed by #2173
Labels
good first issue Issues that are suitable for first-time contributors.

Comments

@dapplion
Copy link
Contributor

dapplion commented Mar 7, 2021

Lodestar-db has a try / catch that swallows all errors, without doing any triage first. Is this expected? Can we define what types of errors do we want to ignore and catch only those?

} catch (e) {
return null;
}

@wemeetagain
Copy link
Member

We probably can remove the try/catch entirely.
I think it was originally there to convert "not-found" errors into null. Thats done within the leveldb IDatabaseController tho.

@wemeetagain wemeetagain added the good first issue Issues that are suitable for first-time contributors. label Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that are suitable for first-time contributors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants