Skip to content

BFF Api 如何返回错误 #3941

Answered by yimingjfe
xmsz asked this question in Q&A
Discussion options

You must be logged in to vote

这里根据使用的运行时框架,按照框架的官方推荐的方式处理即可,比如你使用 Koa.js,就可以通过 ctx.throw 抛出错误,监听 onerror 事件处理错误

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by xmsz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants