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 b1ba54b commit 19cd31bCopy full SHA for 19cd31b
Sources/APIErrorMiddleware/Specialization/Specialization.swift
@@ -42,6 +42,8 @@ public protocol ErrorCatchingSpecialization {
42
43
/// Catches Fluent's `modelNotFound` error and returns a 404 status code.
44
public struct ModelNotFound: ErrorCatchingSpecialization {
45
+ public init() {}
46
+
47
public func convert(error: Error, on request: Request) -> ErrorResult? {
48
if let error = error as? Debuggable, error.identifier == "modelNotFound" {
49
0 commit comments