maybe we can merge this into handleActionUri as well.