You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using FunctionScript in stdlib, I had a hard time finding about the callback function definition and how to return caught errors properly in case of sync and async functions.
Ultimately looking at the testcases and code in lib/gateway.js I was able to confirm
callback definition is callback(error, body, header)
in async function there is no way to return error, we just have to throw them, which would be caught execute to send a proper error response to client
So it would be a lot helpful if we add these details in documentation.
PS: Thanks for putting testcases!
The text was updated successfully, but these errors were encountered:
Hi,
I was using FunctionScript in stdlib, I had a hard time finding about the
callback
function definition and how to return caught errors properly in case of sync and async functions.Ultimately looking at the testcases and code in
lib/gateway.js
I was able to confirmexecute
to send a proper error response to clientSo it would be a lot helpful if we add these details in documentation.
PS: Thanks for putting testcases!
The text was updated successfully, but these errors were encountered: