PusherError
public enum PusherError : LocalizedError
extension PusherError: Equatable
An error encountered whilst using the Pusher Channels HTTP API Swift library.
-
The
URLRequest
could not be initialized with a validURL
.Declaration
Swift
case clientSide
-
The response body could not be decoded to the specified type.
Declaration
Swift
case decodingError(_: DecodingError)
-
The request body could not be encoded to the specified type.
Declaration
Swift
case encodingError(_: EncodingError)
-
The server returned a failed response indicated by a non-successful HTTP
statusCode
.The
errorResponse
will contain a message indicating why the request failed, which can be helpful during development and in production.Declaration
Swift
case failedResponse(statusCode: Int, errorResponse: String)
-
An internal error occured.
Some internal operation of the library has thrown an error. The reason for the failure can be inspected via the
localizedDescription
property of theerror
parameter.Declaration
Swift
case internalError(_: Error)
-
The server returned a response that was not a
HTTPURLResponse
.Declaration
Swift
case unexpectedResponse
-
A localized human-readable description of the error.
Declaration
Swift
public var errorDescription: String? { get }
-
Declaration
Swift
public static func == (lhs: PusherError, rhs: PusherError) -> Bool