Closed KUSHAD closed 1 year ago
Seems like something is throwing an exception when webhook call is simulated. I see that you are catching error and then rethrowing it and message seems to be some kind of an object. Can you try to not rethrow it and simply log original error message and stack trace?
like
try {
...
} catch (e) {
console.log(e.message, e.stack)
}
i am closing this issue as i was not handling error the error correctly, console.log(e.message, e.stack)
this really helped getting to know the error was SIMULATING FILE UPLOAD WEBHOOK CALLBACK http://localhost:3000/api/uploadthing?slug=expenditureDocs Document Description Required ValidationError: Document Description Required at createError (webpack-internal:///(rsc)/./node_modules/yup/index.js:264:27) at handleResult (webpack-internal:///(rsc)/./node_modules/yup/index.js:282:45) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [UT] Successfully simulated callback for file c56b33ae-b105-4a8a-8890-b38cf26059cf_Screenshot 2023-08-28 at 4.47.50 PM.png
which i understood was a validation error so i fixed it thanks for the help @markflorkowski
Problem
I am writing the file route for my document uploading through the uploading, the file is successfully uploaded to uploadthing but that is not updated to my database.But it is showing as success on the client side I am using Prisma and Mongodb
Error
What is expected
The data should be updated to my database after the
onUploadComplete
What I tried
I went to the FAQ section of the docs and found out this question
Failed to simulate callback for file. Is your webhook configured correctly?
but the route is already excluded from the middleware.jsCode
lib/db/uploadthing.js
app/api/uploadthing/route.js
components/add-expediture-docs.js
middleware.js
Video Reproduction
https://github.com/pingdotgg/uploadthing/assets/60665405/46fa28f6-8be9-4fd9-8603-44c45de6ccb2