add security to invalidIdError exception