Giter Site home page Giter Site logo

bookshop's People

Contributors

ibibhu avatar

Watchers

 avatar

bookshop's Issues

"INTERNAL ERROR Type Error" while doing a Patch request on entity.

Issue: [INTERNAL ERROR] TypeError: Cannot convert undefined or null to object while doing PATCH on "Services" entity and the application automatically terminates.

Request :

PATCH /my/Services(ID=9be097a8-d90f-489e-b886-e0ffd12d2341) HTTP/1.1
Host: localhost:4004
Content-Type: application/json
Content-Length: 114

{
    "topics": [
        {
            "topic_ID": "8d8d810a-6b31-4f1f-b1e1-2ee625e21daf"
        }
    ]
}

Response :

image

Logs:

> [email protected] start
> cds run

[cds] - model loaded from 3 file(s):

  db\model.cds
  srv\service.cds
  node_modules\@sap\cds\common.cds

[cds] - connect to db > sqlite { url: 'sqlite.db', database: 'my.db' }
[cds] - serving MyService { path: '/my' }


[cds] - server listening on { url: 'http://localhost:4004' }
[cds] - launched at 16/8/2022, 11:22:14 pm, in: 3.824s      
[cds] - [ terminate with ^C ]

[cds] - PATCH /my/Services(ID=9be097a8-d90f-489e-b886-e0ffd12d2341) 
[cds] - TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Object.keyElements (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\utils.js:18:17)
    at _serializedKey (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:22:8)
    at _dataByKey (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:32:19)
    at _addSubDeepUpdateCQNForDelete (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:38:21)
    at _addSubDeepUpdateCQN (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:223:3)
    at _addSubDeepUpdateCQNRecursion (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:198:11)
    at _addSubDeepUpdateCQN (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:238:10)
    at async getDeepUpdateCQNs (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:295:19)
    at async SQLiteDatabase._update (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\db\query\update.js:63:16) {
  numericSeverity: 4,
  id: '1153846',
  level: 'ERROR',
  timestamp: 1660672344484
}
[INTERNAL ERROR] TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Object.keyElements (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\utils.js:18:17)
    at _serializedKey (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:22:8)
    at _dataByKey (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:32:19)
    at _addSubDeepUpdateCQNForDelete (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:38:21)
    at _addSubDeepUpdateCQN (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:223:3)
    at _addSubDeepUpdateCQNRecursion (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:198:11)
    at _addSubDeepUpdateCQN (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:238:10)
    at async getDeepUpdateCQNs (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\common\composition\update.js:295:19)
    at async SQLiteDatabase._update (C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds\libx\_runtime\db\query\update.js:63:16)



 *  The terminal process "C:\WINDOWS\System32\cmd.exe /d /c npm run start" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Version

@sap/cds: 6.1.0
@sap/cds-compiler: 3.1.0
@sap/cds-dk: 6.1.1
@sap/cds-dk (global): 6.1.1
@sap/cds-foss: 4.0.0
@sap/cds-mtx: -- missing --
Node.js: v14.17.5
bookshop: 1.0.0
home: C:\SAPDevelop\CAP\Playground\bookshop\node_modules\@sap\cds

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.