Skip to content

Commit 7fe268a

Browse files
committed
Attach underlying error to GCDWebServerErrorResponse
1 parent 4ccc10a commit 7fe268a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sources/Adapters/GCDWebServer/GCDHTTPServer.swift

+3-2
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,11 @@ public class GCDHTTPServer: HTTPServer, Loggable {
101101
case let .failure(error):
102102
self.log(.error, error)
103103
failureHandler?(resource.link.href, request.url, error)
104-
response = GCDWebServerErrorResponse(statusCode: error.httpStatusCode)
104+
response = GCDWebServerErrorResponse(statusCode: error.httpStatusCode,
105+
error: error)
105106
}
106107

107-
completion(response)
108+
completion(response) // goes back to GCDWebServerConnection.m
108109
}
109110
}
110111

0 commit comments

Comments
 (0)