From 77a5c0915e582d1f28d21ee78eb44b2c70b5f9ab Mon Sep 17 00:00:00 2001 From: Mick F Date: Mon, 8 Jan 2024 18:25:31 +0100 Subject: [PATCH 1/2] Resync error codes These error codes from the values from the docs. For instance, https://developer.apple.com/documentation/foundation/1508628-url_loading_system_error_codes/nsurlerrorsecureconnectionfailed/ mentions `-1200`, not `-1201`. --- Sources/Foundation/NSURLError.swift | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Sources/Foundation/NSURLError.swift b/Sources/Foundation/NSURLError.swift index a2fbb62b60..8d33ba0576 100644 --- a/Sources/Foundation/NSURLError.swift +++ b/Sources/Foundation/NSURLError.swift @@ -72,13 +72,13 @@ public var NSURLErrorNoPermissionsToReadFile: Int { return -1102 } public var NSURLErrorDataLengthExceedsMaximum: Int { return -1103 } // SSL errors -public var NSURLErrorSecureConnectionFailed: Int { return -1201 } -public var NSURLErrorServerCertificateHasBadDate: Int { return -1202 } -public var NSURLErrorServerCertificateUntrusted: Int { return -1203 } -public var NSURLErrorServerCertificateHasUnknownRoot: Int { return -1204 } -public var NSURLErrorServerCertificateNotYetValid: Int { return -1205 } -public var NSURLErrorClientCertificateRejected: Int { return -1206 } -public var NSURLErrorClientCertificateRequired: Int { return -1207 } +public var NSURLErrorSecureConnectionFailed: Int { return -1200 } +public var NSURLErrorServerCertificateHasBadDate: Int { return -1201 } +public var NSURLErrorServerCertificateUntrusted: Int { return -1202 } +public var NSURLErrorServerCertificateHasUnknownRoot: Int { return -1203 } +public var NSURLErrorServerCertificateNotYetValid: Int { return -1204 } +public var NSURLErrorClientCertificateRejected: Int { return -1205 } +public var NSURLErrorClientCertificateRequired: Int { return -1206 } public var NSURLErrorCannotLoadFromNetwork: Int { return -2000 } // Download and file I/O errors From eb7fdfef174ca1774a58bcd361255de29a0fe6ca Mon Sep 17 00:00:00 2001 From: Mick F Date: Mon, 8 Jan 2024 18:26:21 +0100 Subject: [PATCH 2/2] Add missing NSURLErrorFileOutsideSafeArea code It was missing from the code even though it is marked as done in `Docs/API Surface.tasks`. --- Sources/Foundation/NSURLError.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Foundation/NSURLError.swift b/Sources/Foundation/NSURLError.swift index 8d33ba0576..99c05750af 100644 --- a/Sources/Foundation/NSURLError.swift +++ b/Sources/Foundation/NSURLError.swift @@ -72,6 +72,7 @@ public var NSURLErrorNoPermissionsToReadFile: Int { return -1102 } public var NSURLErrorDataLengthExceedsMaximum: Int { return -1103 } // SSL errors +public var NSURLErrorFileOutsideSafeArea: Int { return -1104 } public var NSURLErrorSecureConnectionFailed: Int { return -1200 } public var NSURLErrorServerCertificateHasBadDate: Int { return -1201 } public var NSURLErrorServerCertificateUntrusted: Int { return -1202 }