Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] function return Internal Server Error #816

Closed
1 of 2 tasks
nightwhite opened this issue Feb 23, 2023 · 2 comments
Closed
1 of 2 tasks

[bug] function return Internal Server Error #816

nightwhite opened this issue Feb 23, 2023 · 2 comments

Comments

@nightwhite
Copy link
Collaborator

Search before asking

  • I had searched in the issues and found no similar issues.

Environment

preview.laf.run

What happened

image

How to reproduce

code:

import cloud from '@lafjs/cloud'

export async function main(ctx: FunctionContext) {
console.log('Hello World')
var funcname = "$$admin_Agetlist"
var funcnum = funcname.match(/$/g)?funcname.match(/$/g).length:0
console.log(funcnum)
return funcnum
}

一旦用浏览器访问一下该函数,该函数后续就会Internal Server Error ,并且后面就算改成
export async function main(ctx: FunctionContext) {
return 1
}
还是Internal Server Error

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@maslow
Copy link
Member

maslow commented Feb 23, 2023

ref: https://stackoverflow.com/questions/39498601/unable-to-send-numbers-using-res-send-using-express-with-node

Express has this problem, which will be fixed in laf in the next release.

@maslow
Copy link
Member

maslow commented Feb 23, 2023

fixed in #817

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants