# List All the Notes

**URL:** <https://discourse.sst.dev/t/list-all-the-notes/156>\
**Category:** Chapter Comments\
**Created:** [May 9, 2018, 8:16pm UTC](https://discourse.sst.dev/t/list-all-the-notes/156 "2018-05-09T20:16:17Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 8:16pm UTC](https://discourse.sst.dev/t/list-all-the-notes/156/1 "2018-05-09T20:16:17Z")

</div>

_From @jayair on Mon Apr 10 2017 01:06:19 GMT+0000 (UTC)_  
  
Link to chapter - [http://serverless-stack.com/chapters/list-all-the-notes.html](http://serverless-stack.com/chapters/list-all-the-notes.html)  
  
_Copied from original issue: [https://github.com/AnomalyInnovations/serverless-stack-com/issues/51](https://github.com/AnomalyInnovations/serverless-stack-com/issues/51)_

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 8:16pm UTC](https://discourse.sst.dev/t/list-all-the-notes/156/2 "2018-05-09T20:16:18Z")

</div>

_From @nvallepalli on Fri Sep 22 2017 16:28:59 GMT+0000 (UTC)_  
  
cannot find the existing notes.

 ![screenshot](https://yyz2.discourse-cdn.com/flex032/uploads/serverless_stack/original/1X/e7fb13a2b346557182f4dee74b54cdea10ab3bc2.PNG)

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 8:16pm UTC](https://discourse.sst.dev/t/list-all-the-notes/156/3 "2018-05-09T20:16:18Z")

</div>

_From @nvallepalli on Fri Sep 22 2017 16:33:47 GMT+0000 (UTC)_  
  
and also invoking create API works for creating notes. But, not able to create a note through the web app.  
I mean I cannot find data in dynamodb table which I tried to insert using the web app.

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 8:16pm UTC](https://discourse.sst.dev/t/list-all-the-notes/156/4 "2018-05-09T20:16:18Z")

</div>

_From @jayair on Fri Sep 22 2017 21:01:00 GMT+0000 (UTC)_  
  
@nvallepalli So this chapter ([https://serverless-stack.com/chapters/test-the-apis.html](https://serverless-stack.com/chapters/test-the-apis.html)) worked for you. But you could not get it to work on the web? Can you check if the console is displaying any errors and if the request to create a note worked properly?

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 8:16pm UTC](https://discourse.sst.dev/t/list-all-the-notes/156/5 "2018-05-09T20:16:19Z")

</div>

_From @nvallepalli on Sat Sep 23 2017 02:03:16 GMT+0000 (UTC)_  
  
yeah this chapter ([https://serverless-stack.com/chapters/test-the-apis.html](https://serverless-stack.com/chapters/test-the-apis.html)) worked for me, but i could not get it on web.

---

<div class="post-metadata">

**Author:** ![anomalyinnovations](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/anomalyinnovations/32/10_2.png) [@anomalyinnovations](https://discourse.sst.dev/u/anomalyinnovations)\
**Post date:** [May 9, 2018, 8:16pm UTC](https://discourse.sst.dev/t/list-all-the-notes/156/6 "2018-05-09T20:16:19Z")

</div>

_From @jayair on Sun Sep 24 2017 01:29:10 GMT+0000 (UTC)_  
  
@nvallepalli Does the request to create the error succeed when you try it on the web?

---

<div class="post-metadata">

**Author:** ![cgle](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@cgle](https://discourse.sst.dev/u/cgle)\
**Post date:** [February 22, 2020, 10:26pm UTC](https://discourse.sst.dev/t/list-all-the-notes/156/7 "2020-02-22T22:26:21Z")

</div>

I’m having some trouble, I don’t think it originates from the steps in this chapter but when I load the page to list all the notes I get a Status 500 error. Everything up to now has worked. I’ve been reading through these forums for a solution and often it’s suggested that with a 500 error you add a “console.log(e)” which I did in my get.js catch block. If that’s right, I cannot seem to find the log where it would give me more information. Is it in CloudWatch? Because there’s nothing obviously related there that I can find, just “status 500 body: false” messages. Frankly I’m really lost and I’m not sure what logs/error messages would be useful to post here.

---

<div class="post-metadata">

**Author:** ![cgle](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@cgle](https://discourse.sst.dev/u/cgle)\
**Post date:** [February 26, 2020, 3:03am UTC](https://discourse.sst.dev/t/list-all-the-notes/156/8 "2020-02-26T03:03:45Z")

</div>

I figured it out. It was a permissions problem at core, but it was massively confused by the fact that I was testing my GET method in the AWS API Gateway console. The problem with doing this is that in the GET method is the line “userId:event.requestContext.identity.cognitoIdentityId”, and of course the AWS API Gateway console has no cognito identity, or at least none corresponding to a table userId. The two-week’s headache is resolved and now I can die. Thanks for this tutorial, it’s great.

---

<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:** [March 8, 2020, 8:11pm UTC](https://discourse.sst.dev/t/list-all-the-notes/156/9 "2020-03-08T20:11:21Z")

</div>

Hmm how come you were testing it through the API Gateway console?

---

<div class="post-metadata">

**Author:** ![cgle](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@cgle](https://discourse.sst.dev/u/cgle)\
**Post date:** [March 12, 2020, 1:29am UTC](https://discourse.sst.dev/t/list-all-the-notes/156/10 "2020-03-12T01:29:42Z")

</div>

I’m not sure I have a good answer for that. Generally I try to be familiar with the resources I’m working with. When I got the error I was digging around for any clues and I found that test console and figured I’d try it in order to get familiar, and because it might help me debug (I didn’t consider the fact that it might hurt my debugging).

---

<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:** [March 30, 2020, 10:52pm UTC](https://discourse.sst.dev/t/list-all-the-notes/156/11 "2020-03-30T22:52:19Z")

</div>

Yeah the debugging experience isn’t great.

---

<div class="post-metadata">

**Author:** ![cesarpachon](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/cesarpachon/32/789_2.png) [@cesarpachon](https://discourse.sst.dev/u/cesarpachon)\
**Post date:** [April 2, 2020, 6:09pm UTC](https://discourse.sst.dev/t/list-all-the-notes/156/12 "2020-04-02T18:09:40Z")

</div>

hello, I have the problem that after login the “isAuthenticated” flag is yet false at the Home Component, despite it is set to True in the Login component… I debugged and saw that calling userHasAuthenticated(true) has no effect (I print the props object right after that):

```
try {
  await Auth.signIn(fields.email, fields.password);
  console.log("setting props.userHasAuthenticated");
  props.userHasAuthenticated(true);
  console.log(props); <-- prints {... isAuthenticated: false, ...}
} catch (e) {

```

**edit 1:** I learn that the useState hook is async, so that explains why it prints isAuthenticated: false in above snippet… but anyway, the change in that variable (if is happening) doesn’t fire the rendering of the list of notes in the home component (I always see the “lander” part). this is where I have the problem.

**edit 2** : Solved… I was yet using “props” instead of “appProps” in the route for the Home component:

```
  <AppliedRoute path="/" exact component={Home} appProps={appProps} />
```

---

<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:** [April 13, 2020, 8:02pm UTC](https://discourse.sst.dev/t/list-all-the-notes/156/13 "2020-04-13T20:02:10Z")

</div>

Yup have a look at the recent changes. We now use React Context to pass them around.
