omar
CDCloudflare Developers
•Created by omar on 1/31/2025 in #workers-help
Getting DataCloneError while using instance of a class as return value of RPC method
It does not extend RpcTarget
11 replies
CDCloudflare Developers
•Created by omar on 1/31/2025 in #workers-help
Getting DataCloneError while using instance of a class as return value of RPC method
also works when i pass logger as a function, a bit weird that passing a class instance to the RPC stub does not work because the structured clone algorithm can copy a class instance
solution:
11 replies
CDCloudflare Developers
•Created by omar on 1/31/2025 in #workers-help
Getting DataCloneError while using instance of a class as return value of RPC method
works well when i don't pass services.logger, does this mean i can't pass any variable to the class instance ? @Hard@Work
11 replies
CDCloudflare Developers
•Created by omar on 1/31/2025 in #workers-help
Getting DataCloneError while using instance of a class as return value of RPC method
cc @Hard@Work
11 replies
CDCloudflare Developers
•Created by omar on 1/31/2025 in #workers-help
Getting DataCloneError while using instance of a class as return value of RPC method
this is how Payments class looks like too
11 replies
CDCloudflare Developers
•Created by omar on 1/31/2025 in #workers-help
Getting DataCloneError while using instance of a class as return value of RPC method
11 replies
CDCloudflare Developers
•Created by omar on 1/31/2025 in #workers-help
Getting DataCloneError while using instance of a class as return value of RPC method
This is what services look like:
Logger is a custom logger, wrapped around console.log
11 replies