SRGSSR / srgletterbox-apple

The official SRG SSR media playback experience
https://srgssr.github.io/marketing/letterbox/
MIT License
14 stars 7 forks source link

Better diagnostic error message #233

Closed pyby closed 3 years ago

pyby commented 3 years ago

Issue type

Feature request

Description of the problem

As a technical investigator, using the SRGDiagnostic reports, implementing in Letterbox, "Content can't be played" error message is not helpful. A technical error message would be better.

Environment information

pyby commented 3 years ago

Propositions:

  1. Last Underlying localized description
  2. Recursive error localized descriptions
  3. Recursive error description like "Domain (code): localized description"

Test 1 with "urn": "urn:rts:video:mediacomposition404",

  1. "ilResult.errorMessage": "Not found"
  2. "ilResult.errorMessage": "Not found"
  3. "ilResult.errorMessage": "ch.srgssr.network (0): Not found"

Test 2 with "urn": "urn:rts:video:playlist404",

  1. "playerResult.errorMessage": "The operation couldn’t be completed. (CoreMediaErrorDomain error -12938 - The operation couldn’t be completed. (CoreMediaErrorDomain error -12938 - HTTP 404: File Not Found))"
  2. "playerResult.errorMessage": "The media cannot be played; The requested URL was not found on this server.; The operation couldn’t be completed. (CoreMediaErrorDomain error -12938 - The operation couldn’t be completed. (CoreMediaErrorDomain error -12938 - HTTP 404: File Not Found))"
  3. "playerResult.errorMessage": "ch.srgssr.mediaplayer (0): The media cannot be played; NSURLErrorDomain (-1100): The requested URL was not found on this server.; CoreMediaErrorDomain (-12938): The operation couldn’t be completed. (CoreMediaErrorDomain error -12938 - The operation couldn’t be completed. (CoreMediaErrorDomain error -12938 - HTTP 404: File Not Found))"

Test 3 with "urn": "urn:rts:video:playlistInvalidHost",

  1. "playerResult.errorMessage": "The operation couldn’t be completed. (OSStatus error 310.)"
  2. "playerResult.errorMessage": "The media cannot be played; The operation could not be completed; The operation couldn’t be completed. (OSStatus error 310.)"
  3. "playerResult.errorMessage": "ch.srgssr.mediaplayer (0): The media cannot be played; AVFoundationErrorDomain (-11800): The operation could not be completed; NSOSStatusErrorDomain (310): The operation couldn’t be completed. (OSStatus error 310.)"
pyby commented 3 years ago

Let decide which one is better for diagnostic:

defagos commented 3 years ago

I prefer option 1. It namely delivers the lowermost error message (thus the real error that triggered the error chain), which is really the most precise information we are interested in. The upper error levels are not that interesting and having a single value is probably better for reporting / consolidation purposes.

pyby commented 3 years ago

Thank you for your review. Option 1 is fine.

pyby commented 3 years ago

Option 1 is included in 6.1.0 release.