Handle the privilege permission error for agent methods