<?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: Expected current segment '' to be '$count', '$ref', or a bound operation in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaa-p/12131350#M4533342</link>
    <description>&lt;P&gt;app module usually has the application router. (file xs-app.json). That might be faulty. &lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2020 16:28:53 GMT</pubDate>
    <dc:creator>kammaje_cis</dc:creator>
    <dc:date>2020-02-27T16:28:53Z</dc:date>
    <item>
      <title>Expected current segment '' to be '$count', '$ref', or a bound operation</title>
      <link>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaq-p/12131348</link>
      <description>&lt;P&gt;Hi @all,&lt;/P&gt;
  &lt;P&gt;I'm just playing with CAP Node.js flavour and Fiori Elements when found that if in my project folder I have something to render in the APP folder even the simplest GET requests goes wrong. &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;{
    "error": {
        "code": null,
        "message": "Expected current segment '' to be '$count', '$ref', or a bound operation"
    }
}&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;and if I delete that folder all HTTP requests goes ok.&lt;/P&gt;
  &lt;P&gt;For sure I'm doing something wrong in the APP folder while playing with FioriElements but the thing is that I could understand having some error while rendering the FioriElement's app BUT, why having this problem with just a GET request?&lt;/P&gt;
  &lt;P&gt;Does anybody know why? I got stucked digging at the schemas and DB's part when the problem is not there &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 18:11:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaq-p/12131348</guid>
      <dc:creator>jsancho</dc:creator>
      <dc:date>2020-02-26T18:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Expected current segment '' to be '$count', '$ref', or a bound operation</title>
      <link>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaa-p/12131349#M4533341</link>
      <description>&lt;P&gt;Hello and thanks for your question.&lt;/P&gt;&lt;P&gt;When you say that you have "something to render in your app folder", what do you mean exactly ?&lt;/P&gt;&lt;P&gt;And also could you give more details as to which GET request you are trying to do then ?&lt;/P&gt;&lt;P&gt;Nicolas&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 23:15:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaa-p/12131349#M4533341</guid>
      <dc:creator>nicolas_lunet</dc:creator>
      <dc:date>2020-02-26T23:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: Expected current segment '' to be '$count', '$ref', or a bound operation</title>
      <link>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaa-p/12131350#M4533342</link>
      <description>&lt;P&gt;app module usually has the application router. (file xs-app.json). That might be faulty. &lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 16:28:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaa-p/12131350#M4533342</guid>
      <dc:creator>kammaje_cis</dc:creator>
      <dc:date>2020-02-27T16:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Expected current segment '' to be '$count', '$ref', or a bound operation</title>
      <link>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaa-p/12131351#M4533343</link>
      <description>&lt;P&gt;Hi Nicolas,&lt;/P&gt;&lt;P&gt;with "something to render in your app folder" I'm want to say that I have an "app" folder with some JS files and an "index.html" file so that CAP could render this web instead of the "by default" one.&lt;/P&gt;&lt;P&gt;Regarding the GET request I'm trying to execute have a look at following screenshot.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1786489-wrong-get-request.png" /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If I have this "app" folder CAP returns HTTP 400 for the GET request, but if there's no "app" folder it handles correctly the GET request without any problem.&lt;/P&gt;&lt;P&gt;Why is that? &lt;/P&gt;&lt;P&gt;As I said, if there's something wrong in my "app" folder I could understand having errors while trying to render it but I didn't expect having this different behaviour with the GET request.&lt;/P&gt;&lt;P&gt;Thanks!!!! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 18:27:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaa-p/12131351#M4533343</guid>
      <dc:creator>jsancho</dc:creator>
      <dc:date>2020-02-27T18:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Expected current segment '' to be '$count', '$ref', or a bound operation</title>
      <link>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaa-p/12131352#M4533344</link>
      <description>&lt;P&gt;Hi Jorge,&lt;/P&gt;&lt;P&gt;look at your requested url "http://localhost:4004/admin/Personas/"&lt;/P&gt;&lt;P&gt;You got the error because of the last "/" in the url. The correct one is "http://localhost:4004/admin/Personas"&lt;/P&gt;&lt;P&gt;Check these samples:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1785541-1-ok.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1785542-2-nok.png" /&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 08:14:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaa-p/12131352#M4533344</guid>
      <dc:creator>marcmaur</dc:creator>
      <dc:date>2020-02-28T08:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Expected current segment '' to be '$count', '$ref', or a bound operation</title>
      <link>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaa-p/12131353#M4533345</link>
      <description>&lt;P&gt;Thnx Marc, but in this case that is not the problem. Here is the thing:&lt;/P&gt;&lt;P&gt;1. If I have this "app" folder so that CAP will try to serve my INDEX.HTML file instead the "by default" entry page, if I execute a simple GET request (even w/o the last "/" &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; ) it returns the already mentinoned error.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1786512-1-app-folder.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1786513-2-get-request-ko.png" /&gt;&lt;/P&gt;&lt;P&gt;2. BUT if I just rename the "app" folder, so that CAP understand that there's nothing "special" to serve but the "by default" entry page, in that case the GET request goes ok.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1786514-3-no-app-folder.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1786515-4-get-request-ok.png" /&gt;&lt;/P&gt;&lt;P&gt;That's the thing that I don't understand, why having this "app" folder makes CAP to behave different to the same GET request?&lt;/P&gt;&lt;P&gt;Later on I'll check if the content of my "app" folder is correct (for sure it's not), but I assume that replying to a given GET request has to behave always the same, no matter if the "by default" entry page or a custom one has to be served. Isn't it?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 11:01:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaa-p/12131353#M4533345</guid>
      <dc:creator>jsancho</dc:creator>
      <dc:date>2020-02-28T11:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Expected current segment '' to be '$count', '$ref', or a bound operation</title>
      <link>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaa-p/12131354#M4533346</link>
      <description>&lt;P&gt;Your app folder contains an index.cds which I assume is somehow influencing the service model. Not sure why you need an index.cds in the app folder, unless you use it for adding annotations.&lt;BR /&gt;Can you&lt;/P&gt;&lt;P&gt;1. With the app folder "active" open localhost:4004 in browser to see what entities are actuallybeing served and also check the $metadata&lt;/P&gt;&lt;P&gt;2. temporarily remove the index.cds, compare with 1. and see whether the error is still there?&lt;/P&gt;</description>
      <pubDate>Sun, 01 Mar 2020 08:30:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/expected-current-segment-to-be-count-ref-or-a-bound-operation/qaa-p/12131354#M4533346</guid>
      <dc:creator>c-kobo</dc:creator>
      <dc:date>2020-03-01T08:30:14Z</dc:date>
    </item>
  </channel>
</rss>

