improved error handling and fixed meal plan api

This commit is contained in:
vabene1111
2023-12-02 18:11:09 +01:00
parent 3e083e2168
commit 3054297357
2 changed files with 1 additions and 7 deletions

View File

@@ -642,7 +642,7 @@ class FoodViewSet(viewsets.ModelViewSet, TreeMixin):
return self.retrieve(request, pk)
except Exception as e:
traceback.print_exc()
return JsonResponse({'error': f'{e} - check server log'}, status=500, json_dumps_params={'indent': 4})
return JsonResponse({'msg': f'there was an error parsing the FDC data, please check the server logs'}, status=500, json_dumps_params={'indent': 4})
def destroy(self, *args, **kwargs):
try: