=== Test case: rest_SUITE:messages_error_handling/1 (click for source code)
=== Config value:
[{watchdog,<0.8353.2>},
{{ejabberd_cwd,mongooseim@localhost},
"/home/circleci/project/_build/mim1/rel/mongooseim"},
{mam_backend,rdbms},
{mim_data_dir,"/home/circleci/project/big_tests/tests/rest_SUITE_data"},
{preset,"odbc_mssql_mnesia"},
{tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.rest_SUITE.logs/run.2022-01-27_15.36.47/rest_suite.messages_error_handling.75780.html"},
{tc_group_properties,[{name,admin},parallel]},
{tc_group_path,[]},
{data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/rest_SUITE_data/"},
{priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11/big_tests.tests.rest_SUITE.logs/run.2022-01-27_15.36.47/log_private/"},
{escalus_users,[{alice,[{username,<<"alicE">>},
{server,<<"localhost">>},
{password,<<"matygrysa">>}]},
{bob,[{username,<<"bOb">>},
{server,<<"localhost">>},
{password,<<"makrolika">>}]}]}]
=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@43a5deef6262.2022-01-27_15.25.11"
=== Started at 2022-01-27 15:36:47
*** User 2022-01-27 15:36:47.975 ***
alicE_messages_error_handling_2144@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 15:36:47.976 ***
alicE_messages_error_handling_2144@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='26f27aae7447a42c' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:36:47.976 ***
alicE_messages_error_handling_2144@localhost/res1 in
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-01-27 15:36:47.976 ***
alicE_messages_error_handling_2144@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX21lc3NhZ2VzX2Vycm9yX2hhbmRsaW5nXzIxNDQAbWF0eWdyeXNh</auth>
*** User 2022-01-27 15:36:47.977 ***
alicE_messages_error_handling_2144@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 15:36:47.978 ***
alicE_messages_error_handling_2144@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 15:36:47.978 ***
alicE_messages_error_handling_2144@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='0b5782d604ad4c7b' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:36:47.978 ***
alicE_messages_error_handling_2144@localhost/res1 in
<stream:features>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-01-27 15:36:47.979 ***
alicE_messages_error_handling_2144@localhost/res1 out
<iq type='set' id='80ebeb0decf358bebfd94e6d4aab2679'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 15:36:47.979 ***
alicE_messages_error_handling_2144@localhost/res1 in
<iq id='80ebeb0decf358bebfd94e6d4aab2679' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>alicE_messages_error_handling_2144@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-27 15:36:47.979 ***
alicE_messages_error_handling_2144@localhost/res1 out
<iq type='set' id='bcc31bf99a23017e050e9c23765f0b04'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:36:47.988 ***
alicE_messages_error_handling_2144@localhost/res1 in
<iq type='result' id='bcc31bf99a23017e050e9c23765f0b04'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:36:47.989 ***
alicE_messages_error_handling_2144@localhost/res1 out
<presence/>
*** User 2022-01-27 15:36:47.994 ***
alicE_messages_error_handling_2144@localhost/res1 in
<presence from='alicE_messages_error_handling_2144@localhost/res1' to='alice_messages_error_handling_2144@localhost/res1' xml:lang='en'/>
*** User 2022-01-27 15:36:47.995 ***
bOb_messages_error_handling_2144@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 15:36:47.996 ***
bOb_messages_error_handling_2144@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e844befcbc2095be' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:36:47.997 ***
bOb_messages_error_handling_2144@localhost/res1 in
<stream:features>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
<mechanism>SCRAM-SHA-256</mechanism>
<mechanism>PLAIN</mechanism>
</mechanisms>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-01-27 15:36:47.997 ***
bOb_messages_error_handling_2144@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9tZXNzYWdlc19lcnJvcl9oYW5kbGluZ18yMTQ0AG1ha3JvbGlrYQ==</auth>
*** User 2022-01-27 15:36:48.000 ***
bOb_messages_error_handling_2144@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
*** User 2022-01-27 15:36:48.000 ***
bOb_messages_error_handling_2144@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
*** User 2022-01-27 15:36:48.041 ***
bOb_messages_error_handling_2144@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='dc3894343512783a' from='localhost' version='1.0' xml:lang='en'>
*** User 2022-01-27 15:36:48.041 ***
bOb_messages_error_handling_2144@localhost/res1 in
<stream:features>
<compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method>
</compression>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
<register xmlns='http://jabber.org/features/iq-register'/>
<amp xmlns='http://jabber.org/feature/amp'/>
<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>
*** User 2022-01-27 15:36:48.041 ***
bOb_messages_error_handling_2144@localhost/res1 out
<iq type='set' id='731143713593d16e6fccb70b6f870f03'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<resource>res1</resource>
</bind>
</iq>
*** User 2022-01-27 15:36:48.042 ***
bOb_messages_error_handling_2144@localhost/res1 in
<iq id='731143713593d16e6fccb70b6f870f03' type='result'>
<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
<jid>bOb_messages_error_handling_2144@localhost/res1</jid>
</bind>
</iq>
*** User 2022-01-27 15:36:48.042 ***
bOb_messages_error_handling_2144@localhost/res1 out
<iq type='set' id='e9c598d9e8a4535e1fe409eeeb6c1089'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:36:48.042 ***
bOb_messages_error_handling_2144@localhost/res1 in
<iq type='result' id='e9c598d9e8a4535e1fe409eeeb6c1089'>
<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>
*** User 2022-01-27 15:36:48.042 ***
bOb_messages_error_handling_2144@localhost/res1 out
<presence/>
*** User 2022-01-27 15:36:48.047 ***
bOb_messages_error_handling_2144@localhost/res1 in
<presence from='bOb_messages_error_handling_2144@localhost/res1' to='bob_messages_error_handling_2144@localhost/res1' xml:lang='en'/>
*** User 2022-01-27 15:36:48.052 ***
REST request fails:
Code: 400
Req: {<0.8583.2>,<<"/api/messages">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"c45b87b2c4481ca8">>}],
<<"{\"to\":\"@noway\",\"caller\":\"alice_messages_error_handling_2144@localhost\",\"body\":\"whatever\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:36:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"25">>}],
<<"Invalid jid: <<\"@noway\">>">>,158,3048}
Params: #{body =>
<<"{\"to\":\"@noway\",\"caller\":\"alice_messages_error_handling_2144@localhost\",\"body\":\"whatever\"}">>,
method => <<"POST">>,path => <<"/api/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:36:48.054 ***
REST request fails:
Code: 400
Req: {<0.8597.2>,<<"/api/messages">>,<<"POST">>,
[{<<"Content-Type">>,<<"application/json">>},
{<<"Request-Id">>,<<"0d1e361a995ec3b1">>}],
<<"{\"to\":\"bob_messages_error_handling_2144@localhost\",\"caller\":\"@noway\",\"body\":\"whatever\"}">>}
Result: {{<<"400">>,<<"Bad Request">>},
[{<<"server">>,<<"Cowboy">>},
{<<"date">>,<<"Thu, 27 Jan 2022 15:36:48 GMT">>},
{<<"content-type">>,<<"application/json">>},
{<<"content-length">>,<<"25">>}],
<<"Invalid jid: <<\"@noway\">>">>,158,953}
Params: #{body =>
<<"{\"to\":\"bob_messages_error_handling_2144@localhost\",\"caller\":\"@noway\",\"body\":\"whatever\"}">>,
method => <<"POST">>,path => <<"/api/messages">>,
return_headers => true,role => admin,
server => #{node => mongooseim@localhost}}
*** User 2022-01-27 15:36:48.054 ***
bOb_messages_error_handling_2144@localhost/res1 out
</stream:stream>
*** User 2022-01-27 15:36:48.055 ***
bOb_messages_error_handling_2144@localhost/res1 in
</stream:stream>
*** User 2022-01-27 15:36:48.055 ***
alicE_messages_error_handling_2144@localhost/res1 out
</stream:stream>
*** User 2022-01-27 15:36:48.055 ***
alicE_messages_error_handling_2144@localhost/res1 in
</stream:stream>
=== Ended at 2022-01-27 15:36:48
=== successfully completed test case
=== === Returned value: ok