remove exception details from api response

This commit is contained in:
vabene1111
2022-06-14 15:07:31 +02:00
parent c2135de941
commit b30c282a13

View File

@ -1183,7 +1183,7 @@ def reset_food_inheritance(request):
return Response({'message': 'success', }, status=status.HTTP_200_OK)
except Exception as e:
traceback.print_exc()
return Response(str(e), status=status.HTTP_400_BAD_REQUEST)
return Response({}, status=status.HTTP_400_BAD_REQUEST)
@api_view(['GET'])
@ -1203,7 +1203,7 @@ def switch_active_space(request, space_id):
return Response("not found", status=status.HTTP_404_NOT_FOUND)
except Exception as e:
traceback.print_exc()
return Response(str(e), status=status.HTTP_400_BAD_REQUEST)
return Response({}, status=status.HTTP_400_BAD_REQUEST)
def get_recipe_provider(recipe):