Refine request dispatching via api

- [x] More solid request dispathing workflow
- [x] Refine `catch_errors` decorator
    - [x] Support custom errorhandler
    - [x] Write test suite
    - [x] Write errors into the application log
    - [x] Catch `HttpException` as well.