Pass errors from scala to UI