Skip to content

Commit

Permalink
Merge pull request #14 from brokenhandsio/log-full-error
Browse files Browse the repository at this point in the history
Log the full error rather than swallowing it
  • Loading branch information
0xTim committed Feb 22, 2020
2 parents 914b77f + dd2f650 commit ec012da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ coverage:
range: "0...100"
ignore:
- "Tests/"
- ".build/"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
DerivedData/
Package.pins
Package.resolved
.swiftpm
1 change: 1 addition & 0 deletions Sources/LeafErrorMiddleware/LeafErrorMiddleware.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public final class LeafErrorMiddleware: Middleware, Service {
return try res.encode(for: req)
}
}.catchFlatMap { error in
try? req.make(Logger.self).report(error: error, verbose: true)
switch (error) {
case let abort as AbortError:
guard
Expand Down

0 comments on commit ec012da

Please sign in to comment.