Commit d75505ac authored by Zandor Smith's avatar Zandor Smith 💻

Return error if the downloaded image data can't be converted into an UIImage object.

parent 28c71d18
......@@ -24,5 +24,6 @@ public enum APICallError {
case loginExpired
case invalidCredentials
case accountInactive
case unexpectedResponse
case unknown
}
......@@ -57,6 +57,8 @@ open class Image {
}
self.getCallbacks.removeAll()
}
} else {
onError(.unexpectedResponse)
}
}, onError: onError)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment