Skip to content
Snippets Groups Projects
Commit e77ed4ee authored by Bjarke Madsen's avatar Bjarke Madsen
Browse files

don't access response.data for direct_passthrough

parent 86a2134d
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,9 @@ def after_request(response):
:param response:
:return:
"""
if response.status_code != 200:
# direct_passthrough is set to True when the response is a file (e.g serving the front-end)
if response.status_code >= 400 and not response.direct_passthrough:
try:
data = response.data.decode('utf-8')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment