Send statemachine errors back to client
log some server error/message into browser console

adapt pmg script to use this output