fix(collection): optimize error handling