resize with error