Repo contains errors handler (in app.js file) that is actually about 10 rows.
The other code is used for errors's emulation and for testing (using simple flask application for server side).
Errors are shown in console, but in real application the best place could be the alert. User needs to know that error was happen. Alert is simple and 100% working solution for this.

