We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1a57742 + 5ba327e commit 9f18138Copy full SHA for 9f18138
1 file changed
api/views.py
@@ -282,7 +282,11 @@ def get_queryset(self, **kwargs):
282
283
def converge(self, request, **kwargs):
284
node = self.get_object()
285
- output, _ = node.converge()
+ try:
286
+ output, _ = node.converge()
287
+ except RuntimeError as e:
288
+ return Response(e.output, status=status.HTTP_500_INTERNAL_SERVER_ERROR,
289
+ content_type='text/plain')
290
return Response(output, status=status.HTTP_200_OK, content_type='text/plain')
291
292
0 commit comments