@defer.run/client
Advanced tools
Comparing version 0.1.0 to 0.1.1-alpha-20221221121603-d247621
@@ -78,5 +78,11 @@ "use strict"; | ||
else if (result.state === "failed") { | ||
// TODO | ||
// reject(result.error); | ||
reject(new Error("Defer execution failed")); | ||
let error = new Error("Defer execution failed"); | ||
if (result.result.message) { | ||
error = new Error(result.result.message); | ||
error.stack = result.result.stack; | ||
} | ||
else if (result.result) { | ||
error = result.result; | ||
} | ||
reject(error); | ||
return; | ||
@@ -83,0 +89,0 @@ } |
@@ -73,5 +73,11 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
else if (result.state === "failed") { | ||
// TODO | ||
// reject(result.error); | ||
reject(new Error("Defer execution failed")); | ||
let error = new Error("Defer execution failed"); | ||
if (result.result.message) { | ||
error = new Error(result.result.message); | ||
error.stack = result.result.stack; | ||
} | ||
else if (result.result) { | ||
error = result.result; | ||
} | ||
reject(error); | ||
return; | ||
@@ -78,0 +84,0 @@ } |
{ | ||
"name": "@defer.run/client", | ||
"version": "0.1.0", | ||
"version": "0.1.1-alpha-20221221121603-d247621", | ||
"description": "cua JavaScript client", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
20512
380