throw errors on bad URI