[asterisk-commits] dlee: trunk r393834 - /trunk/res/stasis_http/ari_websockets.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 8 15:08:01 CDT 2013


Author: dlee
Date: Mon Jul  8 15:07:58 2013
New Revision: 393834

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393834
Log:
Better structure for the WebSocket validation failure message

Modified:
    trunk/res/stasis_http/ari_websockets.c

Modified: trunk/res/stasis_http/ari_websockets.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/stasis_http/ari_websockets.c?view=diff&rev=393834&r1=393833&r2=393834
==============================================================================
--- trunk/res/stasis_http/ari_websockets.c (original)
+++ trunk/res/stasis_http/ari_websockets.c Mon Jul  8 15:07:58 2013
@@ -124,8 +124,11 @@
 	return ast_json_ref(message);
 }
 
-#define VALIDATION_FAILED					\
-	"{ \"error\": \"Outgoing message failed validation\" }"
+#define VALIDATION_FAILED				\
+	"{"						\
+	"  \"error\": \"InvalidMessage\","		\
+	"  \"message\": \"Message validation failed\""	\
+	"}" 
 
 int ari_websocket_session_write(struct ari_websocket_session *session,
 	struct ast_json *message)




More information about the asterisk-commits mailing list