You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current definition of storeRequest(_:response:error:data:metrics:) in LoggerStore is expecting the error argument to be of type Error, which resolves to the internal LoggerStore.Error, preventing us to pass Swift.Error into the method like we could pre v2.0.
It seems like an oversight that is further suggested by the implementation of the storeRequest method which maps Swift.Error into the NetworkLogger.ResponseError.
Expectation
Unless I'm missing something, the method definition should look like this public func storeRequest(_ request: URLRequest, response: URLResponse?, error: Swift.Error?, data: Data?, metrics: URLSessionTaskMetrics? = nil). Note the explicit Swift.Error error type.
The text was updated successfully, but these errors were encountered:
Description
Current definition of
storeRequest(_:response:error:data:metrics:)
in LoggerStore is expecting theerror
argument to be of typeError
, which resolves to the internalLoggerStore.Error
, preventing us to passSwift.Error
into the method like we could pre v2.0.It seems like an oversight that is further suggested by the implementation of the storeRequest method which maps
Swift.Error
into theNetworkLogger.ResponseError
.Expectation
Unless I'm missing something, the method definition should look like this
public func storeRequest(_ request: URLRequest, response: URLResponse?, error: Swift.Error?, data: Data?, metrics: URLSessionTaskMetrics? = nil)
. Note the explicitSwift.Error
error type.The text was updated successfully, but these errors were encountered: