Closed hossam-nasr closed 2 years ago
Fixes #373. The df.entity() function before was returning an async function that also calls context.done(), causing the error:
df.entity()
context.done()
Error: Choose either to return a promise or call 'done'. Do not use both in your script. Learn more: https://go.microsoft.com/fwlink/?linkid=2097909
To be thrown, which was hidden from logs before, but was surfaced after a node worker bug was fixed in https://github.com/Azure/azure-functions-nodejs-worker/pull/555.
This PR removes the context.done() call and replaces it with the return value of the function. Potentially could be considred a "breaking" change since it changes the type signature of the customer-facing df.entity() function
Closing this in favor of #373 and #397
Fixes #373. The
df.entity()
function before was returning an async function that also callscontext.done()
, causing the error:To be thrown, which was hidden from logs before, but was surfaced after a node worker bug was fixed in https://github.com/Azure/azure-functions-nodejs-worker/pull/555.
This PR removes the
context.done()
call and replaces it with the return value of the function. Potentially could be considred a "breaking" change since it changes the type signature of the customer-facingdf.entity()
function