Changed error message to a functions which don't use api.