Skip to content

Commit 04305fa

Browse files
committed
Fix finishwithErrors for err object
1 parent 6cc0b23 commit 04305fa

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simplify-sdk",
3-
"version": "0.1.58",
3+
"version": "0.1.59",
44
"description": "Simplify Framework SDK library for NodeJS",
55
"main": "simplify.js",
66
"dependencies": {

simplify.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,9 +1274,9 @@ const getFunctionMetricData = function (options) {
12741274
})
12751275
}
12761276

1277-
const finishWithErrors = function (opName, err) {
1277+
const finishWithErrors = function (opName, error) {
12781278
opName = `${CBEGIN}Simplify${CRESET} | ${opName}` || `${CBEGIN}Simplify${CRESET} | unknownOperation`
1279-
console.error(`${opName}: \n - ${CERROR}${err}${CRESET} \n`)
1279+
console.error(`${opName}: \n - ${CERROR}${(error.message || error).truncate(150)}${CRESET} \n`)
12801280
process.exit(255)
12811281
}
12821282

0 commit comments

Comments
 (0)