Log any CSP errors that occur when disabling a user.

When one user disables another's environment role in Azure, sometimes an
exception will be raised. Since we catch the exception and display an
error message to the user, we should also log the exception so that the
error is traceable later.
This commit is contained in:
dandds
2019-12-13 06:20:38 -05:00
parent 095120a806
commit 8f94d9e6ec
3 changed files with 45 additions and 1 deletions

View File

@@ -40,6 +40,9 @@ class FakeLogger:
def error(self, msg, *args, **kwargs):
self._log("error", msg, *args, **kwargs)
def exception(self, msg, *args, **kwargs):
self._log("exception", msg, *args, **kwargs)
def _log(self, _lvl, msg, *args, **kwargs):
self.messages.append(msg)
if "extra" in kwargs: