handle uri errors