API.get("myNewTable", `/path/${id}`); not working and I can't figure out why


I’m building an API that should manage short stories. The API currently has been gracious enough to let me add a short story to the table using the create function call and list the one short story using the list function call but I can’t, for the life of me, get it to render the one short story in its own container/view.

Its frustrating because it works using the serverless invoke local command from the api repo, it works testing it in the api-gateway console, and it works when I test it in the lambda console. The only place it doesn’t work is from the client.

I assume it has something to do with the amplify configuration but if the create and list calls work with the same configuration, then this should work too.

Oh and I have CloudWatch enabled and log level set at INFO but I am getting no feedback on what the problem could be.

Anyone have any ideas about what I can do to fix this?

Can you post the error you are getting?

Hi Jay,

I’m getting the ‘page not found’ route.

Then I would add the route first in the Routes.js.

1 Like

Hmmp. That did it. I looked back at Routes.js and saw that the route I was trying to get to didn’t have a leading backslash so the route wasn’t matching. up.

1 Like

Touché sir. Thanks for your help. I apparently just had to hit the panic button to get unstuck. :slight_smile: