Skip to content

Commit

Permalink
Merge pull request #39 from Phala-Network/fix-promise-catch
Browse files Browse the repository at this point in the history
fix: handling promise rejection in built artifact
  • Loading branch information
pacoyang authored Jul 7, 2024
2 parents 2ad46ad + d49e94f commit 0881392
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@phala/fn",
"version": "0.2.21",
"version": "0.2.22",
"description": "Phat Function CLI toolkit",
"bin": {
"phat-fn": "bin/run"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/runWebpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const MAX_BUILD_SIZE = 1024 * 400

const BUILD_ASYNC_CODE_TEMPLATE = `
import main from '{filePath}';
main.apply(null, globalThis.scriptArgs).then(result => globalThis.scriptOutput = result);
main.apply(null, globalThis.scriptArgs).then(result => globalThis.scriptOutput = result).catch(err => globalThis.scriptOutput = JSON.stringify({error: err, success: false}));
`

const BUILD_CODE_TEMPLATE = `
Expand Down

0 comments on commit 0881392

Please sign in to comment.