catch bad uri error so the server does not crash