mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Add server error message details (fix #221)
This commit is contained in:
parent
cbae8628c9
commit
a0088e5404
@ -234,7 +234,16 @@ extension PlayerModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func videoLoadFailureHandler(_ error: RequestError) {
|
private func videoLoadFailureHandler(_ error: RequestError) {
|
||||||
navigation.presentAlert(title: "Could not load video", message: error.userMessage)
|
var message = error.userMessage
|
||||||
|
if let errorDictionary = error.json.dictionaryObject,
|
||||||
|
let errorMessage = errorDictionary["message"] ?? errorDictionary["error"],
|
||||||
|
let errorString = errorMessage as? String
|
||||||
|
{
|
||||||
|
message += "\n"
|
||||||
|
message += errorString
|
||||||
|
}
|
||||||
|
|
||||||
|
navigation.presentAlert(title: "Could not load video", message: message)
|
||||||
advancing = false
|
advancing = false
|
||||||
videoBeingOpened = nil
|
videoBeingOpened = nil
|
||||||
currentItem = nil
|
currentItem = nil
|
||||||
|
Loading…
Reference in New Issue
Block a user