dispatch: wrap exceptions in str() before format()
This commit is contained in:
parent
b09c20e910
commit
57588afbe6
@ -82,7 +82,7 @@ class DispatchMessage(generics.GenericAPIView):
|
||||
bot.privmsg(action.destination, text)
|
||||
except Exception as e:
|
||||
new_data = copy.deepcopy(message.data)
|
||||
new_data['status'] = "FAILED - {0:s}".format(e)
|
||||
new_data['status'] = "FAILED - {0:s}".format(str(e))
|
||||
new_message = self.serializer_class(data=new_data)
|
||||
return Response(new_message.initial_data)
|
||||
elif action.type == DispatcherAction.FILE_TYPE:
|
||||
|
Loading…
Reference in New Issue
Block a user