show correct error on createObject