Moves initial system settings rest call out to resolve

This commit is contained in:
mabashian
2019-09-05 09:10:59 -04:00
committed by Ryan Petrello
parent 608567795d
commit 113622c05e
4 changed files with 48 additions and 12 deletions

View File

@@ -201,7 +201,7 @@ class ApiV2SubscriptionView(APIView):
getattr(getattr(exc, 'response', None), 'status_code', None) == 401
):
msg = _("The provided credentials are invalid (HTTP 401).")
if isinstance(exc, ValueError) and exc.args:
if isinstance(exc, (ValueError, OSError)) and exc.args:
msg = exc.args[0]
logger.exception(smart_text(u"Invalid license submitted."),
extra=dict(actor=request.user.username))