Skip to content

Commit 55e2ea6

Browse files
committed
fixing again + upgrade
1 parent 07a67ef commit 55e2ea6

2 files changed

Lines changed: 34 additions & 32 deletions

File tree

Package.resolved

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/ErrorsCore/Middleware/ApiErrorsMiddleware.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ public final class ErrorsCoreMiddleware: Middleware, Service {
4646
default:
4747
self.log.error(error.localizedDescription)
4848

49-
if if let abort = error as? AbortError {
49+
if let debuggable = error as? Debuggable {
50+
reason = debuggable.reason
51+
} else if let abort = error as? AbortError {
5052
reason = abort.reason
5153
} else {
52-
reason = error.reason
54+
reason = "Something went wrong. \(error.localizedDescription)"
5355
}
5456
}
5557
return try req.response.internalServerError(message: reason)

0 commit comments

Comments
 (0)