We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd4cead commit e576f23Copy full SHA for e576f23
Sources/APIErrorMiddleware/Specialization/Specialization.swift
@@ -40,6 +40,9 @@ public protocol ErrorCatchingSpecialization {
40
41
// MARK: - ErrorCatchingSpecialization implementations
42
43
+#if canImport(Fluent)
44
+import Fluent
45
+
46
/// Catches Fluent's `modelNotFound` error and returns a 404 status code.
47
public struct ModelNotFound: ErrorCatchingSpecialization {
48
public init() {}
@@ -55,3 +58,4 @@ public struct ModelNotFound: ErrorCatchingSpecialization {
55
58
return nil
56
59
}
57
60
61
+#endif
0 commit comments