Skip to content

Commit 272a055

Browse files
committed
Azure Function: avoid error about context.done()
An Azure Function is supposed to either return a `Promise` or call `context.done()`, otherwise the following error will be shown: [Error] 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 Since we do prefer to return a `Promise`, let's just skip the call to `context.done()`. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 7ae8f0b commit 272a055

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

GitGitGadget/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,4 @@ module.exports = async (context, req) => {
137137
body: `Caught an error: ${e.message || JSON.stringify(e, null, 2)}`,
138138
};
139139
}
140-
141-
context.done();
142140
};

0 commit comments

Comments
 (0)