protect event machine loop against exceptions raised by JSON parsing