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

feat(FEC-13652): add meaningful error message #760

Merged
merged 6 commits into from
Apr 4, 2024
Merged

Conversation

lianbenjamin
Copy link
Contributor

@lianbenjamin lianbenjamin commented Apr 4, 2024

Description of the Changes

inside catch block of loadMedia, we classify errors that might come from BE (through provider) as Player errors. However, we would like to recognize them and provide the category number that suits them.

changes:

  • inside catch block of loadMedia, before firing the error as Player category, try to get the category according to the error payload.
  • if category is 2, it means it is Service category that came from provider
  • code 2001 is block action error
  • under error.code = 2001 we need to distinguish between SESSION_RESTRICTED and COUNTRY_RESTRICTED
  • code 2002 is media is not ready error
  • fallback to Player category as default

Resolves FEC-13652

src/kaltura-player.ts Outdated Show resolved Hide resolved
@lianbenjamin lianbenjamin merged commit fde58c7 into master Apr 4, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants