-
Notifications
You must be signed in to change notification settings - Fork 6
Errors
Jack Works edited this page Nov 18, 2020
·
1 revision
AsyncCallGenerator receives a request to execute next()
, return()
or throw()
on the given iterator instance, but that instance was not found.
If the iterator is returned {done: true}
, it will removed from the memory. Further request on this instance will throw this error.
Symbols cannot be transferred to the remote side so you cannot use a symbol as your RPC method name.
AsyncCall({
[Symbol.for("Don't do this")]() {}
}, { channel })
If you get this error accidentally, please check if well-known symbols are called on the AsyncCall instance.
According to the specification of JSON RPC, methods started with "rpc." are used internally.
Error 3: "then" method is called on the AsyncCall instance, please explicitly set thenable
to true
or false
in the option.
Consider this code:
async function getRPC() {
return AsyncCall(...)
}
According to the JS semantics, it will invoke the "then" method immediately on the returning instance which is unwanted in most scenarios.