Skip to content

Commit e576f23

Browse files
authored
Fixed compilation error
Sorry! 🙇‍♂️
1 parent bd4cead commit e576f23

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/APIErrorMiddleware/Specialization/Specialization.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public protocol ErrorCatchingSpecialization {
4040

4141
// MARK: - ErrorCatchingSpecialization implementations
4242

43+
#if canImport(Fluent)
44+
import Fluent
45+
4346
/// Catches Fluent's `modelNotFound` error and returns a 404 status code.
4447
public struct ModelNotFound: ErrorCatchingSpecialization {
4548
public init() {}
@@ -55,3 +58,4 @@ public struct ModelNotFound: ErrorCatchingSpecialization {
5558
return nil
5659
}
5760
}
61+
#endif

0 commit comments

Comments
 (0)