Call the List API

#61

Wow. I figured out the issue. I had a trailing / on my API Gateway in my config file.

1 Like

#62

Wow that’s annoying. Glad you figured it out.

0 Likes

#63

Hi Jay,

I’m having trouble with the API.get("notes", "/notes"); call.
The front end is throwing this error:

TypeError: Cannot read property 'trim' of undefined

I figured the url for api gateway was misconfigured so I added a trailing ‘/’ to the url in the config file but that throws a network error.

I redeployed my apis and checked the endpoints against what I have in the config file and they match.

Still, the only thing I can think of is that the get request isn’t populating the note object because its not hitting the api properly. Do you have any idea where the problem can be coming from?

Thanks in advance! :slight_smile:

0 Likes

#64

Have you created a note with no content?

1 Like

#65

Yep that was it. Good eye.

For some reason I set the key to ‘note’ in create.js instead of ‘content’ in the API set up.

Thanks for the assist.

1 Like