Handling json::TypeError inside Client/Server