<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: UI5 Mockserver with INVALID_STATE_ERR - 4 in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/ui5-mockserver-with-invalid-state-err-4/qaa-p/12583427#M4718872</link>
    <description>&lt;P&gt;issue resolved. By hardcode the status to 1, at the end of your functionality.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2022 03:18:37 GMT</pubDate>
    <dc:creator>NeoXie</dc:creator>
    <dc:date>2022-09-15T03:18:37Z</dc:date>
    <item>
      <title>UI5 Mockserver with INVALID_STATE_ERR - 4</title>
      <link>https://community.sap.com/t5/technology-q-a/ui5-mockserver-with-invalid-state-err-4/qaq-p/12583425</link>
      <description>&lt;P&gt;Hi colleagues,&lt;/P&gt;
  &lt;P&gt;I use function &lt;STRONG&gt;fnMergeAfter = function (oEvent) and oMockServer.attachAfter("MERGE", fnMergeAfter, "C_SlsPricingConditionRecordTP") &lt;/STRONG&gt;to send response with sap-message when APP merge data.&lt;/P&gt;
  &lt;P&gt;However, APP sucessfully get the sap-message but will have error: INVALID_STATE_ERR - 4,&lt;/P&gt;
  &lt;P&gt;sinon.js:184 &lt;U&gt;&lt;STRONG&gt;Uncaught Error: INVALID_STATE_ERR - 4&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt; at k (sinon.js:184:3467)&lt;BR /&gt; at F.w [as setResponseHeaders] (sinon.js:184:6351)&lt;BR /&gt; at F.x [as respond] (sinon.js:184:8488)&lt;BR /&gt; at Object.response (MockServer-dbg.js:3236:16)&lt;BR /&gt; at F.b (sinon.js:196:852)&lt;BR /&gt; at F.n [as processRequest] (sinon.js:196:2451)&lt;BR /&gt; at F.i [as handleRequest] (sinon.js:196:1681)&lt;BR /&gt; at x.onSend (sinon.js:196:1207)&lt;BR /&gt; at F.x [as send] (sinon.js:184:7014)&lt;BR /&gt; at Object.send (jquery-dbg.js:10224:9)&lt;/P&gt;
  &lt;P&gt;I just add the message in oEvent as below:&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;oEvent.getParameters().oXhr.respondJSON(200, {"sap-message": sReturnMsg},&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;JSON.stringify({&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;d: oEvent.getParameter("oEntity")&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;}));&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;The comparation between working one and error one is as below (ready state 1 is working, but if add response, it changes to ready state 4):&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2057840-compare.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;Could any mock server expert provide any ideas or solution to provide message when MERGE request comes?&lt;/P&gt;
  &lt;P&gt;Thanks in advance for your support!&lt;/P&gt;
  &lt;P&gt;Br,&lt;/P&gt;
  &lt;P&gt;Neo&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 03:03:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/ui5-mockserver-with-invalid-state-err-4/qaq-p/12583425</guid>
      <dc:creator>NeoXie</dc:creator>
      <dc:date>2022-06-14T03:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: UI5 Mockserver with INVALID_STATE_ERR - 4</title>
      <link>https://community.sap.com/t5/technology-q-a/ui5-mockserver-with-invalid-state-err-4/qaa-p/12583426#M4718871</link>
      <description>&lt;P&gt;Hi Neo, &lt;/P&gt;&lt;P&gt;Tag &lt;A href="https://answers.sap.com/tags/3b727198-80b8-459f-b8ec-5bcf6f9578d5" target=""&gt;test automation tool for SAP S/4HANA Cloud&lt;/A&gt; is for &lt;A href="https://blogs.sap.com/2021/09/07/sap-s-4hana-cloud-test-automation/"&gt;&lt;EM&gt;&lt;STRONG&gt;SAP S/4HANA Cloud Test Automation Tool&lt;/STRONG&gt;&lt;/EM&gt;&lt;/A&gt;  which is an integral part of SAP S/4HANA Cloud Essentials &amp;amp; provisioned for all customers in their Quality systems. So I removed this tag.&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Marissa&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 12:37:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/ui5-mockserver-with-invalid-state-err-4/qaa-p/12583426#M4718871</guid>
      <dc:creator>Marissa</dc:creator>
      <dc:date>2022-09-14T12:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: UI5 Mockserver with INVALID_STATE_ERR - 4</title>
      <link>https://community.sap.com/t5/technology-q-a/ui5-mockserver-with-invalid-state-err-4/qaa-p/12583427#M4718872</link>
      <description>&lt;P&gt;issue resolved. By hardcode the status to 1, at the end of your functionality.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 03:18:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/ui5-mockserver-with-invalid-state-err-4/qaa-p/12583427#M4718872</guid>
      <dc:creator>NeoXie</dc:creator>
      <dc:date>2022-09-15T03:18:37Z</dc:date>
    </item>
  </channel>
</rss>

