Releases: skelpo/APIErrorMiddleware
v0.3.5
v0.3.4
v0.3.3
Error JSON Encoding Failure Error
Instead of having an empty body for the response body when JSON encoding fails, we use a string value that tells you what went wrong.
v0.3.2
Debug the Debuggable
Added a case to the error conditions in the APIErrorMIddleware
responder for Debuggable
errors when the app is in a dev environment.
Also added a compiler conditional so you don't get warnings about casting an Error
to CustomStringConvertible
always succeeding. Because it doesn't. On Linux that is.
Fix for linux
For some reason linux throws "APIErrorMiddleware.swift:92:31: error: 'Error' is not convertible to 'CustomStringConvertible'; did you mean to use 'as!' to force downcast?".
This is not fixed though it generates a warning for Mac. The warning is of no meaning though.
v0.3.0
The 3rd Vapor
Now uses the official 3.0 release of Vapor 💪.
v0.2.2
If the Promise don't Succeed, Try, Try Again.
Apparently returning the result of next.respond(to:)
was a bad idea, so now we only return response.futureResult
. We don't have errors escaping the middleware anymore 🙂.
v0.2.1
Fixed Bad Synth
Public structs don't get public synthesized initializers. Bah! So the ModelNotCreated
struct now has an initializer.
v0.2.0
Specializations
Create custom error handlers for converting specific errors to specific responses.
https://github.com/skelpo/APIErrorMiddleware#specializations