mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +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) {
|
||||
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