[ios] category sharing - fix upload error processing

This commit is contained in:
o.bolovintseva 2018-11-26 17:16:44 +03:00 committed by Olesia Bolovintseva
parent fd49db79c8
commit 1d8fc66344

View file

@ -217,9 +217,10 @@ final class BookmarksSharingViewController: MWMTableViewController {
func showErrorAlert(_ error: NSError) {
guard error.code == kCategoryUploadFailedCode,
let status = error.userInfo[kCategoryUploadStatusKey] as? MWMCategoryUploadStatus else {
assert(false)
return
let statusCode = error.userInfo[kCategoryUploadStatusKey] as? Int,
let status = MWMCategoryUploadStatus(rawValue: statusCode) else {
assert(false)
return
}
switch (status) {