add comments

This commit is contained in:
Ivan Smolin 2017-10-27 21:32:31 +03:00
parent b26932fbfe
commit 29e5150337
2 changed files with 9 additions and 2 deletions

View File

@ -22,7 +22,7 @@
import Foundation
/// Enum which represents common errors in LeadKit framework
/// Enum that represents common errors in LeadKit framework
///
/// - failedToCastValue: attempt to cast was failed
public enum LeadKitError: Error {

View File

@ -22,9 +22,16 @@
import Alamofire
/// Enum that represents general api request errors
///
/// - noConnection: No connection to the server (no internet connection, or connection timed out error)
/// - network: Unknown network-related error.
/// - invalidResponse: Invalid server response (response serialization or validation errors).
/// This includes unacceptable status codes (500, etc), json serialization errors, etc.
/// - mapping: Errors that occurs during mapping json into model.
public enum RequestError: Error {
case noConnection // no connection to the server
case noConnection
case network(error: Error)
case invalidResponse(error: AFError)
case mapping(error: Error, response: Any)