session permission error handling