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

Adding error handling to readWithBuffer function #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AndreHrs
Copy link

When machine does not have logs data stored (Mine was ZKTeco K20),
This library will cease to function (not throwing exception and just failed)
The original code tried to decode header which was empty or trying to access commandId from empty object

I just added exception handling to readWithBuffer function so it will reject the promise and does not stop the whole code from running.

-- Additional Comment --
Also, sorry for the lint
I forgot to disable the lint on save function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant