#NotFound: The requested resource was not found. this issue i am facing
22 messages · Page 1 of 1 (latest)
Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
Documentation:
try adding the code in try-catch block
i tried but same error repeating. i am using postgresql. i need to cofigure anything ?
would you mind splitting your code example and adding ts to your backticks?
i check both id was available but return same error
no i didn't split code
Can you please split your code in the snippet you provided
and add ts to your backticks:
``ts
in your call, payload.findByID, you haven't specified which collection you wish to search on
what happens when you try to access that resource with a classic rest call;
http://localhost:3000/api/uploads/[id]
working fine when i hit the api. but in afterchange hook call the REST API or LOCAL API throw resource not found error
Have you tried breakpointing it?
I think the database is not fast enough to insert the created payload doc.
- I have afterChange create // e.g. on users
- and want immediately update this doc // e.g. to add more data to this user
- It only works if I add a timeout >5 seconds
@fleet pewter why not add the data in a beforeChange hook instead? That way you are modifying the data before it reaches the database