SAP Knowledge Base Article - Preview

3697327 - CAP filter single quote ' : 404 - Error: Invalid resource path

Symptom

  • Querying CAP service with single quote ' in the value hitting error like :

    cds watch

    [error] - 404 - Error: Invalid resource path "test.Tests('key'with.dot')"
        at module.exports [as afterburner] (C:\CAP\string-parser\node_modules\@sap\cds\libx\odata\parse\afterburner.js:897:11)
        at _enhanceCqn (C:\CAP\string-parser\node_modules\@sap\cds\libx\odata\index.js:73:19)
        at Object.parse (C:\CAP\string-parser\node_modules\@sap\cds\libx\odata\index.js:125:13)
        at odata_parse_url (C:\CAP\string-parser\node_modules\@sap\cds\libx\odata\middleware\parse.js:12:28)
        at Layer.handle [as handle_request] (C:\CAP\string-parser\node_modules\express\lib\router\layer.js:95:5)
        at trim_prefix (C:\CAP\string-parser\node_modules\express\lib\router\index.js:328:13)
        at C:\CAP\string-parser\node_modules\express\lib\router\index.js:286:9
        at Function.process_params (C:\CAP\string-parser\node_modules\express\lib\router\index.js:346:12)
        at next (C:\CAP\string-parser\node_modules\express\lib\router\index.js:280:10)
        at set_odata_version (C:\CAP\string-parser\node_modules\@sap\cds\libx\odata\ODataAdapter.js:34:7) {
      code: '404'

  • The value has single quote for example : key'with.dot


Read more...

Environment

SAP CAP Node.js

Product

SAP Business Technology Platform all versions ; SAP Cloud Application Programming Model all versions

Keywords

Invalid resource path, 404, single quote, ', '', curl , KBA , BC-XS-CDX-NJS , SAP CAP – node.js runtime , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.