Skip to content

Commit 19cd31b

Browse files
committed
Added public initializer to ModelNotFound struct
1 parent b1ba54b commit 19cd31b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/APIErrorMiddleware/Specialization/Specialization.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public protocol ErrorCatchingSpecialization {
4242

4343
/// Catches Fluent's `modelNotFound` error and returns a 404 status code.
4444
public struct ModelNotFound: ErrorCatchingSpecialization {
45+
public init() {}
46+
4547
public func convert(error: Error, on request: Request) -> ErrorResult? {
4648
if let error = error as? Debuggable, error.identifier == "modelNotFound" {
4749

0 commit comments

Comments
 (0)