[![Swift Version][swift-image]][swift-url] [![License][license-image]][license-url]
Quick implementation of error middleware.
The latest version of ErrorMiddleware requires Swift 5.8 and MacOS v13 or later. You can download this version of the Swift binaries by following this link.
Add the ErrorMiddleware
package to the dependencies within your application’s Package.swift
file. Substitute "x.x.x"
with the latest ErrorMiddleware
release.
.package(url: "https://github.com/LLCFreedom-Space/fs-error-middleware.git", from: "x.x.x")
Add ErrorMiddleware
to your target's dependencies:
.target(name: "ErrorMiddleware", dependencies: ["ErrorMiddleware"]),
import ErrorMiddleware
Add the ErrorMiddleware
package to the dependencies within your application’s Package.swift
file. Substitute "name branch"
with the latest ErrorMiddleware
release.
.package(url: "https://github.com/LLCFreedom-Space/fs-error-middleware.git", branch: "name branch")
Add ErrorMiddleware
to your target's dependencies:
.target(name: "ErrorMiddleware", dependencies: ["ErrorMiddleware"]),
import ErrorMiddleware
An example of a method call from this library
app.middleware.use(ErrorMiddleware.custom(environment: app.environment, for: "NumberId"))
To access the methods that are in this library, you need to call the application, since this library is an extension to the application