Update error message on undefined functions to pass back an error object