API: Upload new version of an extension #138
@ -197,7 +197,6 @@ class UploadExtensionVersionView(APIView):
|
|||||||
status=status.HTTP_403_FORBIDDEN,
|
status=status.HTTP_403_FORBIDDEN,
|
||||||
)
|
)
|
||||||
|
|
||||||
Oleg-Komarov marked this conversation as resolved
Outdated
|
|||||||
try:
|
|
||||||
# Create a NewVersionView instance to handle file creation
|
# Create a NewVersionView instance to handle file creation
|
||||||
new_version_view = NewVersionView(request=request, extension=extension)
|
new_version_view = NewVersionView(request=request, extension=extension)
|
||||||
|
|
||||||
@ -231,10 +230,3 @@ class UploadExtensionVersionView(APIView):
|
|||||||
},
|
},
|
||||||
status=status.HTTP_201_CREATED,
|
status=status.HTTP_201_CREATED,
|
||||||
)
|
)
|
||||||
except Exception as e:
|
|
||||||
return Response(
|
|
||||||
{
|
|
||||||
'message': str(e),
|
|
||||||
},
|
|
||||||
status=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
|
||||||
)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user
could we avoid this big try-except? what is the default drf error behavior?
we need to make sure that we are not leaking any error details in production - we will have the exception logged via sentry, and api users can't do anything useful with those details