Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2355a7e

Browse files
committed
[#2770] Return default error page on fanstatic errors
1 parent 70097df commit 2355a7e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ckan/controllers/error.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ def document(self):
2929
if not original_response:
3030
return 'There is no error.'
3131
# Bypass error template for API operations.
32-
if original_request and original_request.path.startswith('/api'):
32+
if (original_request and
33+
(original_request.path.startswith('/api') or
34+
original_request.path.startswith('/fanstatic'))):
3335
return original_response.body
3436
# Otherwise, decorate original response with error template.
3537
c.content = literal(original_response.unicode_body) or \

0 commit comments

Comments
 (0)