Call the List API

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

1 Like

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

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:

Have you created a note with no content?

1 Like

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

Hi there,

I have a doubt.

I did everything you did for the pages forms and layouts. So, everything is working fine through the Call the List API, but I realized in the previous step that, apparently I am not sending (or saving) the file in the bucket. The code is exactly the same you posted, so, I think I did something wrong when configuring the API on AWS or setting up the S3 bucket.

I am going to show what is displayed at my S3 page at AWS:

Do you have any ideas of how I can fix this?

Can you inspect the developer console in your browser to see if the request to upload the file is successful?

I am having an issue.

I can create a note and upload it with an attachment no problem. But when I try to list the notes I get a error 500

My config does not have a trailing “/”