Added error validation to URI shotener