diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
index 844deb408a5b3c537cb41732637fe2955c338d96_bWVyY3VyaWFsL2hnd2ViL3dlYmNvbW1hbmRzLnB5..b24c23f7c1f9e7071460c87dc849b12559545cb4_bWVyY3VyaWFsL2hnd2ViL3dlYmNvbW1hbmRzLnB5 100644
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -1172,7 +1172,7 @@
     key = web.req.qsparams['node']
 
     if type_ not in webutil.archivespecs:
-        msg = 'Unsupported archive type: %s' % type_
+        msg = 'Unsupported archive type: %s' % stringutil.pprint(type_)
         raise ErrorResponse(HTTP_NOT_FOUND, msg)
 
     if not ((type_ in allowed or