     func status(_ status: String) -> ResponseRepresentable {
         return JSON(["status": .string(status)])
     }
+
+    enum EmailError: Error {
+        case invalidEmailFormat
+    }
 }

        passwordResetMailer: PasswordResetMailerType
    ) throws -> ResponseRepresentable {
        do {
            let user = try U.find(request: request)
            let token = try tokenGenerators
                .resetPasswordTokenGenerator

                resetToken: token,
                subject: "Reset Password"
            )
        } catch is EmailError {
            return status("Invalid Email format.")
        } catch let error as AbortError where error.status == .notFound {
            // ignore "notFound" errors and pretend the operation succeeded
        }
