Skip to content

Commit 6c7d88d

Browse files
committed
Check for HTTPResponseError in FileMiddleware, rather than a concrete type
1 parent e343b69 commit 6c7d88d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Hummingbird/Middleware/FileMiddleware.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public struct FileMiddleware<Context: RequestContext, Provider: FileProvider>: R
9797
return try await next(request, context)
9898
} catch {
9999
// Guard that error is HTTP error notFound
100-
guard let httpError = error as? HTTPError, httpError.status == .notFound else {
100+
guard let httpError = error as? HTTPResponseError, httpError.status == .notFound else {
101101
throw error
102102
}
103103

0 commit comments

Comments
 (0)