ERROR handleCallbackRequest Failed to register callback result
I've integrated UploadThing in my platform. The client is a NextJS application and the server is a cluster of NestJS microservices.
The issue is that after a successful file upload (on UploadThing the file is present), the onUploadComplete callback is not executed, thus not finishing the upload correctly on the client, because I'm getting:
Since I'm developing, I've made sure to have the isDev flag to true.
Implementing UploadThing has been almost effortless and I really like it, but there's this error that I can't understand, maybe I'm dumb and forgot something... PLS help, I'm cooked.
Solution:Jump to solution
hey - that error you're getting is probably cause you're returning a string from
onUploadComplete
. We expect the return to be an object. I've submitted a patch that will type-error when returning primitive values so this will become a compile-time error instead of a surfacing first at runtime https://github.com/pingdotgg/uploadthing/pull/9683 Replies
Hmm can you share your uploadthing file router config?
Solution
hey - that error you're getting is probably cause you're returning a string from
onUploadComplete
. We expect the return to be an object. I've submitted a patch that will type-error when returning primitive values so this will become a compile-time error instead of a surfacing first at runtime https://github.com/pingdotgg/uploadthing/pull/968Thanks Julius, I don't know why I haven't thought of it, but yes a patch is needed:blessjmg:
Regardless, congratulations on building such a cool product, I look forward to show you guys how I used it!