There are in general two types of errors: one occurs in runtime and the other takes place during code compilation. Runtime errors are expensive because they are difficult to track and tackle. Swift enforces strong type checking to reduce the chance of your mistake slipping through compilation error checking and become a runtime error. Unit tests with good code coverage also help you discover problems during development time. However, when a runtime error does occur, you'll need a better strategy to cope with it.
This is especially true for a server-side project because it is hard to reproduce the same condition that caused a runtime error to happen when there could be so many different kinds of networking conditions and situations. Normally, you'll set breakpoints in your code for some conditions which you suspect to have caused...