diff --git a/Sources/SimpleHTTP/Interceptor/CompositeInterceptor.swift b/Sources/SimpleHTTP/Interceptor/CompositeInterceptor.swift index 8c489fd..d7b166e 100644 --- a/Sources/SimpleHTTP/Interceptor/CompositeInterceptor.swift +++ b/Sources/SimpleHTTP/Interceptor/CompositeInterceptor.swift @@ -18,7 +18,7 @@ extension CompositeInterceptor: Interceptor { public func adaptRequest(_ request: Request) async -> Request { var request = request for interceptor in interceptors { - request = await interceptor.adaptRequest(request) + request = await interceptor.adaptRequest(request) } return request diff --git a/Tests/SimpleHTTPTests/Response/URLDataResponseTests.swift b/Tests/SimpleHTTPTests/Response/URLDataResponseTests.swift index 635a56c..714bc19 100644 --- a/Tests/SimpleHTTPTests/Response/URLDataResponseTests.swift +++ b/Tests/SimpleHTTPTests/Response/URLDataResponseTests.swift @@ -13,7 +13,7 @@ class URLDataResponseTests: XCTestCase { let response = URLDataResponse(data: Data(), response: HTTPURLResponse.notFound) let transformer: DataErrorDecoder = { _ in XCTFail("transformer should not be called when data is empty") - throw NSError() + throw NSError(domain: "test", code: 0) } XCTAssertThrowsError(try response.validate(errorDecoder: transformer))