mirror of
https://github.com/yattee/yattee.git
synced 2024-12-14 06:10:32 +05:30
Add server error message details (fix #221)
This commit is contained in:
parent
384a884195
commit
e50a14b13a
@ -234,7 +234,16 @@ extension PlayerModel {
|
||||
}
|
||||
|
||||
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
|
||||
videoBeingOpened = nil
|
||||
currentItem = nil
|
||||
|
Loading…
Reference in New Issue
Block a user