You can not assign a proxy object to the "type" property which should be a String.