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

Handle parse errors gracefully #25

Open
avhetman opened this issue Nov 5, 2019 · 0 comments
Open

Handle parse errors gracefully #25

avhetman opened this issue Nov 5, 2019 · 0 comments

Comments

@avhetman
Copy link
Collaborator

avhetman commented Nov 5, 2019

Sometimes, a malformed base64 or hexadecimal string is provided as input. When this happens, an error like this can happen: UnhandledPromiseRejectionWarning: Error: Binary read error sectionLength: 2730 + 3 !== data.length: 15 at parseSCTE35Data

We need to either have some sort of validation here or maybe even a try catch block and output an error elucidating the reason we were not able to parse the string.

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

No branches or pull requests

1 participant