Skip to content

Commit

Permalink
Merge branch 'master' into 4357_msm_redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
chiatt committed Jan 18, 2019
2 parents 3834289 + 1836d48 commit 0cc3417
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions arches/app/views/api.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import os
import sys
import json
import uuid
import re
import traceback
from django.shortcuts import render
from django.views.generic import View
from django.views.decorators.csrf import csrf_exempt
Expand Down Expand Up @@ -121,8 +123,12 @@ def get(self, request, surveyid=None):
else:
return JSONResponse('Sync Failed', status=403)
except Exception as e:
print('Sync error: {0}'.format(e))
ret = 'Sync failed'
exc_type, exc_value, exc_traceback = sys.exc_info()
formatted = traceback.format_exception(exc_type, exc_value, exc_traceback)
if len(formatted):
for message in formatted:
print message
ret = {'Syncfailed': {'stacktrace': formatted}}

return JSONResponse(ret, status=500)

Expand Down

0 comments on commit 0cc3417

Please sign in to comment.