Open ianthetechie opened 9 years ago
Now that the details are in... many usages of fatalError
should now be replaced with a swift-style exception and caught in a logical place. fatalError
should only be used in cases of programmer error. Otherwise, we generally want our server to be able to recover and continue handling requests.
Swift does not yet support exception handling, but when it does, the main request/response handler block, including all of the wares (pre, middle, and post) should be wrapped in a giant exception handler that returns a 500 response if something goes wrong.