Fix typo in Exception and remove unused import

I noticed the error message as it was thrown in my failing tests for the
permission-based dashboard.