]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: don't log 3xx as errors 46461/head
authorErnesto Puerta <epuertat@redhat.com>
Tue, 22 Mar 2022 13:40:30 +0000 (14:40 +0100)
committerErnesto Puerta <epuertat@redhat.com>
Tue, 31 May 2022 17:33:20 +0000 (19:33 +0200)
commit8ae834379a4f45838c61bdcd0b8c9948fba6fcca
treeae5719eed290ad57cf5e5e756acb2e8a49e4a312
parentcdf6bb0c7e9037f8e2d986482def5a3223faddb4
mgr/dashboard:  don't log 3xx as errors

Let's avoid printing these ugly/misleading/redundant messages:

```
0 [dashboard DEBUG controllers.home] frontend language from headers: ['en-us']
0 [dashboard DEBUG controllers.home] found directory for language 'en-us'
0 [dashboard DEBUG controllers.home] serving static content: /home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/build/src/pybind/mgr/dashboard/frontend/dist/en-US/styles.css
0 [dashboard ERROR exception] Internal Server Error
Traceback (most recent call last):
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/services/exception.py", line 47, in dashboard_exception_handler
    return handler(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/cherrypy/_cpdispatch.py", line 60, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/home/jenkins-build/build/workspace/ceph-dashboard-pull-requests/src/pybind/mgr/dashboard/controllers/home.py", line 134, in __call__
    return serve_file(full_path)
  File "/usr/lib/python3/dist-packages/cherrypy/lib/static.py", line 70, in serve_file
    cptools.validate_since()
  File "/usr/lib/python3/dist-packages/cherrypy/lib/cptools.py", line 117, in validate_since
    raise cherrypy.HTTPRedirect([], 304)
cherrypy._cperror.HTTPRedirect: ([], 304)
```

Fixes: https://tracker.ceph.com/issues/54991
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
(cherry picked from commit 406e54d8c41bbc94b7285077d3055766629a2313)
src/pybind/mgr/dashboard/services/exception.py