@@ -94,7 +94,7 @@ public extension Server {
9494 try Task . checkCancellation ( )
9595 } catch {
9696 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: api. path) ) [Cancelled] " )
97- throw error
97+ throw ServerAPIError . taskCancelled ( error: error )
9898 }
9999
100100 let request = try api. request ( . GET, in: self . currentEnvironment, additionalHeaders: self . additionalHTTPHeaders, additionalQueries: queries, httpBodyOverride: httpBody, timeoutInterval: timeoutInterval)
@@ -104,7 +104,7 @@ public extension Server {
104104 try Task . checkCancellation ( )
105105 } catch {
106106 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: request. url? . description) ) [Cancelled] " )
107- throw error
107+ throw ServerAPIError . taskCancelled ( error: error )
108108 }
109109
110110 return decoded
@@ -127,7 +127,7 @@ public extension Server {
127127 try Task . checkCancellation ( )
128128 } catch {
129129 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: api. path) ) [Cancelled] " )
130- throw error
130+ throw ServerAPIError . taskCancelled ( error: error )
131131 }
132132
133133 let request = try api. request ( . POST, in: self . currentEnvironment, additionalHeaders: self . additionalHTTPHeaders, additionalQueries: queries, httpBodyOverride: httpBody, timeoutInterval: timeoutInterval)
@@ -137,7 +137,7 @@ public extension Server {
137137 try Task . checkCancellation ( )
138138 } catch {
139139 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: request. url? . description) ) [Cancelled] " )
140- throw error
140+ throw ServerAPIError . taskCancelled ( error: error )
141141 }
142142
143143 return decoded
@@ -157,7 +157,7 @@ public extension Server {
157157 try Task . checkCancellation ( )
158158 } catch {
159159 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: api. path) ) [Cancelled] " )
160- throw error
160+ throw ServerAPIError . taskCancelled ( error: error )
161161 }
162162
163163 let request = try api. request ( . POST, in: self . currentEnvironment, additionalHeaders: self . additionalHTTPHeaders, additionalQueries: queries, httpBodyOverride: httpBody, timeoutInterval: timeoutInterval)
@@ -167,7 +167,7 @@ public extension Server {
167167 try Task . checkCancellation ( )
168168 } catch {
169169 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: request. url? . description) ) [Cancelled] " )
170- throw error
170+ throw ServerAPIError . taskCancelled ( error: error )
171171 }
172172
173173 return wasSuccessful
@@ -191,7 +191,7 @@ public extension Server {
191191 try Task . checkCancellation ( )
192192 } catch {
193193 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: api. path) ) [Cancelled] " )
194- throw error
194+ throw ServerAPIError . taskCancelled ( error: error )
195195 }
196196
197197 let request = try api. request ( . PUT, in: self . currentEnvironment, additionalHeaders: self . additionalHTTPHeaders, additionalQueries: queries, httpBodyOverride: httpBody, timeoutInterval: timeoutInterval)
@@ -201,7 +201,7 @@ public extension Server {
201201 try Task . checkCancellation ( )
202202 } catch {
203203 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: request. url? . description) ) [Cancelled] " )
204- throw error
204+ throw ServerAPIError . taskCancelled ( error: error )
205205 }
206206
207207 return decoded
@@ -222,7 +222,7 @@ public extension Server {
222222 try Task . checkCancellation ( )
223223 } catch {
224224 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: api. path) ) [Cancelled] " )
225- throw error
225+ throw ServerAPIError . taskCancelled ( error: error )
226226 }
227227
228228 let request = try api. request ( . PUT, in: self . currentEnvironment, additionalHeaders: self . additionalHTTPHeaders, additionalQueries: queries, httpBodyOverride: httpBody, timeoutInterval: timeoutInterval)
@@ -232,7 +232,7 @@ public extension Server {
232232 try Task . checkCancellation ( )
233233 } catch {
234234 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: request. url? . description) ) [Cancelled] " )
235- throw error
235+ throw ServerAPIError . taskCancelled ( error: error )
236236 }
237237
238238 return wasSuccessful
@@ -255,7 +255,7 @@ public extension Server {
255255 try Task . checkCancellation ( )
256256 } catch {
257257 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: api. path) ) [Cancelled] " )
258- throw error
258+ throw ServerAPIError . taskCancelled ( error: error )
259259 }
260260
261261 let request = try api. request ( . DELETE, in: self . currentEnvironment, additionalHeaders: self . additionalHTTPHeaders, additionalQueries: queries, httpBodyOverride: httpBody, timeoutInterval: timeoutInterval)
@@ -265,7 +265,7 @@ public extension Server {
265265 try Task . checkCancellation ( )
266266 } catch {
267267 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: request. url? . description) ) [Cancelled] " )
268- throw error
268+ throw ServerAPIError . taskCancelled ( error: error )
269269 }
270270
271271 return decoded
@@ -285,7 +285,7 @@ public extension Server {
285285 try Task . checkCancellation ( )
286286 } catch {
287287 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: api. path) ) [Cancelled] " )
288- throw error
288+ throw ServerAPIError . taskCancelled ( error: error )
289289 }
290290
291291 let request = try api. request ( . DELETE, in: self . currentEnvironment, additionalHeaders: self . additionalHTTPHeaders, additionalQueries: queries, httpBodyOverride: httpBody, timeoutInterval: timeoutInterval)
@@ -295,7 +295,7 @@ public extension Server {
295295 try Task . checkCancellation ( )
296296 } catch {
297297 self . logger. info ( " \( Date ( ) ) - ( \( requestUID) ) Request to \( String ( describing: request. url? . description) ) [Cancelled] " )
298- throw error
298+ throw ServerAPIError . taskCancelled ( error: error )
299299 }
300300
301301 return wasSuccessful
0 commit comments