[Mykola Kurutin] added handling for JSON parsing exceptions while retrieving a task from the queue