Better structure for the WebSocket validation failure message
authorDavid M. Lee <dlee@digium.com>
Mon, 8 Jul 2013 20:07:58 +0000 (20:07 +0000)
committerDavid M. Lee <dlee@digium.com>
Mon, 8 Jul 2013 20:07:58 +0000 (20:07 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393834 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/stasis_http/ari_websockets.c

index d020f62..2808e54 100644 (file)
@@ -124,8 +124,11 @@ struct ast_json *ari_websocket_session_read(
        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)