fix a minor bug in the way we report certain license upload errors

This commit is contained in:
Ryan Petrello 2020-10-28 09:57:42 -04:00
parent b031e1f05e
commit 94b6b31185
No known key found for this signature in database
GPG Key ID: F2AA5F2122351777

View File

@ -366,7 +366,7 @@ class ApiV2ConfigView(APIView):
try:
license_data = validate_entitlement_manifest(license_data['manifest'])
except ValueError as e:
return Response({"error": e}, status=status.HTTP_400_BAD_REQUEST)
return Response({"error": str(e)}, status=status.HTTP_400_BAD_REQUEST)
except Exception:
logger.exception('Invalid manifest submitted. {}')
return Response({"error": _('Invalid manifest submitted.')}, status=status.HTTP_400_BAD_REQUEST)