# Add a List All the Notes API - 500 error

**URL:** <https://discourse.sst.dev/t/add-a-list-all-the-notes-api-500-error/1291>\
**Category:** Chapter Comments\
**Created:** [October 1, 2019, 4:53pm UTC](https://discourse.sst.dev/t/add-a-list-all-the-notes-api-500-error/1291 "2019-10-01T16:53:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwfresh](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@dwfresh](https://discourse.sst.dev/u/dwfresh)\
**Post date:** [October 1, 2019, 4:53pm UTC](https://discourse.sst.dev/t/add-a-list-all-the-notes-api-500-error/1291/1 "2019-10-01T16:53:30Z")

</div>

Hi, I I am following the tutorial here.

> **[Add a List All the Notes API](https://sst.dev/chapters/add-a-list-all-the-notes-api.html)**
>
> To allow users to retrieve their notes in our note taking app, we are going to add a list note GET API. To do this we will add a new Lambda function to our Serverless Framework project. The Lambda function will retrieve all the user’s notes from the...

Everything has worked perfectly up until I try  
`serverless invoke local --function list --path mocks/list-event.json`  
this is the error:

> ```
> {
> "statusCode": 500,
> "headers": {
> "Access-Control-Allow-Origin": "*",
> "Access-Control-Allow-Credentials": true
> },
> "body": "{\"status\":false}"
> }
> 
> ```

I have double checked the code and even copied pasted all the relevant files to my local.  
All the other local functions like create/get/update work just fine, so I don’t know what’s going on.  
any help please ! thanks

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [October 9, 2019, 7:57pm UTC](https://discourse.sst.dev/t/add-a-list-all-the-notes-api-500-error/1291/2 "2019-10-09T19:57:50Z")

</div>

The `status: false` errors are generated in our code. So you can debug them by adding a `console.log` in your Lambda function.

---

<div class="post-metadata">

**Author:** ![dwfresh](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@dwfresh](https://discourse.sst.dev/u/dwfresh)\
**Post date:** [October 10, 2019, 4:06pm UTC](https://discourse.sst.dev/t/add-a-list-all-the-notes-api-500-error/1291/3 "2019-10-10T16:06:22Z")

</div>

ok gotcha. thanks for the info !

---

<div class="post-metadata">

**Author:** ![lordpyro](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/lordpyro/32/796_2.png) [@lordpyro](https://discourse.sst.dev/u/lordpyro)\
**Post date:** [October 11, 2019, 4:21am UTC](https://discourse.sst.dev/t/add-a-list-all-the-notes-api-500-error/1291/4 "2019-10-11T04:21:54Z")

</div>

I am new to this…where in the Lambda function would you write that?

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [October 12, 2019, 12:17am UTC](https://discourse.sst.dev/t/add-a-list-all-the-notes-api-500-error/1291/5 "2019-10-12T00:17:27Z")

</div>

No worries, I think I answered you in the other thread.

---

<div class="post-metadata">

**Author:** ![dwfresh](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@dwfresh](https://discourse.sst.dev/u/dwfresh)\
**Post date:** [October 12, 2019, 10:08pm UTC](https://discourse.sst.dev/t/add-a-list-all-the-notes-api-500-error/1291/6 "2019-10-12T22:08:56Z")

</div>

anywhere in here :

> ```
> try {
> const result = await dynamoDbLib.call("query", params);
> console.log(result);
> // Return the matching list of items in response body
> return success(result.Items);
> } catch (e) {
> console.log(e);
> return failure({ status: false });
> }
> 
> ```

i had the the error ‘Query condition missed key schema element: noteId’, this was because i accdientally created the table with the wrong partition key
