Potential fix for code scanning alert no. 16: Information exposure through an exception
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
@@ -25,7 +25,7 @@ class ReverseGeocodeViewSet(viewsets.ViewSet):
|
||||
return Response({"error": "Invalid latitude or longitude"}, status=400)
|
||||
data = reverse_geocode(lat, lon, self.request.user)
|
||||
if 'error' in data:
|
||||
return Response(data, status=400)
|
||||
return Response({"error": "An internal error occurred while processing the request"}, status=400)
|
||||
return Response(data)
|
||||
|
||||
@action(detail=False, methods=['post'])
|
||||
|
||||
Reference in New Issue
Block a user