ArxivServerError
public enum ArxivServerError : Error
A server error that can be passed to arXiv fetch task completion handler.
-
Passed if
URLSessionDataTask
HTTP response code is not in the range [200…299]. The associated value is HTTP status code of the reponse.Declaration
Swift
case httpResponseError(statusCode: Int)
-
Passed when a
URLSessionDataTask
completion handler returns no error and no HTTP response.This should never happen, but it is included to guard against crashes in corner cases, as
URLSession
documentation doesn’t state when and ifURLResponse
can benil
when noURLError
occurs.Declaration
Swift
case unexpectedHTTPError