You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/08/05 15:28:32 UTC

[airavata-django-portal] branch develop updated: Log ObjectDoesNotExist errors at warning level

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git


The following commit(s) were added to refs/heads/develop by this push:
     new 6d2bd4e  Log ObjectDoesNotExist errors at warning level
6d2bd4e is described below

commit 6d2bd4ec9d00acd10bbda29d2d0a5ddef4254d77
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Aug 4 17:57:41 2021 -0400

    Log ObjectDoesNotExist errors at warning level
    
    Some API calls are checking if a file or something else exists and it is appropriate to return a 404 and
    it really isn't anything that admins need to be emailed about.
---
 django_airavata/apps/api/exceptions.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/django_airavata/apps/api/exceptions.py b/django_airavata/apps/api/exceptions.py
index 405491f..7caf17c 100644
--- a/django_airavata/apps/api/exceptions.py
+++ b/django_airavata/apps/api/exceptions.py
@@ -38,7 +38,7 @@ def custom_exception_handler(exc, context):
             status=status.HTTP_500_INTERNAL_SERVER_ERROR)
 
     if isinstance(exc, ObjectDoesNotExist):
-        log.error("ObjectDoesNotExist", exc_info=exc)
+        log.warning("ObjectDoesNotExist", exc_info=exc)
         return Response(
             {'detail': str(exc)},
             status=status.HTTP_404_NOT_FOUND)