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

Trigger ATTACH_MEDIA_ERROR when calling attachMedia with falsey media argument #6556

Merged
merged 11 commits into from
Jul 20, 2024

Conversation

agajassi
Copy link
Contributor

This PR will...

Improves error handling in hls.attachMedia(media) when null is passed as a parameter.

Why is this Pull Request needed?

Logging error to the console will benefit users when when attachMedia is called with a null parameter and this feedback will also help avoid potential confusion.

Resolves issues:

#6463

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

agajassi added 4 commits July 15, 2024 22:11
new error detail for attachMedia
trigger error if media is null
unit test for null condition in attachMedia and some spelling mistake corrections in previous tests
update ErrorDetails
src/hls.ts Outdated Show resolved Hide resolved
@robwalch robwalch added this to the 1.6.0 milestone Jul 16, 2024
omitting `reason` property, since it is the same message
@agajassi agajassi requested a review from robwalch July 16, 2024 16:42
src/hls.ts Outdated Show resolved Hide resolved
agajassi and others added 3 commits July 16, 2024 13:57
Co-authored-by: Rob Walch <robwalch@users.noreply.github.com>
src/hls.ts Outdated Show resolved Hide resolved
@agajassi agajassi requested a review from robwalch July 18, 2024 20:15
@robwalch robwalch changed the title feature/trigger-attachMedia-error-for-null-parameter Trigger ATTACH_MEDIA_ERROR when calling attachMedia with falsey media argument Jul 18, 2024
src/hls.ts Outdated Show resolved Hide resolved
tests/unit/hls.ts Outdated Show resolved Hide resolved
agajassi added 2 commits July 19, 2024 11:21
forgot smart quotes
updating test to make it more detailed, and assert error.message
@agajassi agajassi requested a review from robwalch July 19, 2024 18:29
@robwalch robwalch merged commit ed30446 into video-dev:master Jul 20, 2024
12 checks passed
@robwalch robwalch linked an issue Jul 20, 2024 that may be closed by this pull request
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.

Improve Error Handling for "attachMedia" with Null
2 participants