mesg-foundation / js-sdk

Javascript mono-repo with all the tools to interact with MESG
https://mesg.com
4 stars 4 forks source link

Service output, add error when output function is called without object #44

Closed NicolasMahe closed 4 years ago

NicolasMahe commented 5 years ago

In a service, if the output function is called without parameter, the error is not explanatory. The lib should check for this and return a nice error.

export default async (inputs: TaskInputs, outputs: TaskOutputs): Promise<void> => {
    return outputs.success() // forgot to put return something
}