chore(resource): use minErr to throw exception