From 826f227175c61bacf5d39579d81db82954455ca9 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Dec 14 2016 09:48:35 +0000 Subject: Return a 500 error instead of a 400 when the server fails to decode the file --- diff --git a/pagure/ui/repo.py b/pagure/ui/repo.py index e36f5a6..bd94814 100644 --- a/pagure/ui/repo.py +++ b/pagure/ui/repo.py @@ -723,7 +723,7 @@ def view_blame_file(repo, filename, username=None, namespace=None): except pagure.exceptions.PagureException: # We cannot decode the file, so bail but warn the admins LOG.exception('File could not be decoded') - flask.abort(400, 'File could not be decoded') + flask.abort(500, 'File could not be decoded') blame = repo_obj.blame(filename)