return error if no endpoint found