mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-04 21:58:54 -05:00
improved error handling and fixed meal plan api
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user