Skip to content

Commit

Permalink
fix: 修复云函数调用错误返回状态码;
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Jul 18, 2021
1 parent 9360fa8 commit 145fdcd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "less-framework",
"version": "0.1.6",
"version": "0.1.7",
"description": "less framework base on less-api",
"main": "./dist/index.js",
"scripts": {
Expand Down Expand Up @@ -31,8 +31,8 @@
"express": "^4.17.1",
"fs-extra": "^9.1.0",
"jsonwebtoken": "^8.5.1",
"less-api": "^1.4.6",
"less-api-database": "^0.3.10",
"less-api": "^1.4.9",
"less-api-database": "^0.3.13",
"lodash": "^4.17.21",
"log4js": "^6.3.0",
"moment": "^2.29.1",
Expand Down
2 changes: 1 addition & 1 deletion src/router/function/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async function handleInvokeFunction(req: Request, res: Response) {
if (result.error) {
logger.info(`[${requestId}] /func/${func_name} invoke error: `, result.error.message)
logger.error(`[${requestId}] /func/${func_name} invoke error: `, result)
return res.status(400).send({
return res.send({
error: 'invoke function occurs error',
logs: debug ? result.logs : undefined,
time_usage: debug ? result.time_usage : undefined,
Expand Down

0 comments on commit 145fdcd

Please sign in to comment.