我正在为我的项目构建一个 API,我想抛出自定义错误以在我的应用程序中捕获它。
按照文档,我抛出了代码“未知”的错误
throw new functions.https
.HttpsError("unknown",
"this is my error message",
{code :'myCustomCode',
message :'my custom message'}
)
然后,我收到了正确的消息和详细信息,但出现了“内部服务器错误”

我不确定这是创建具有云功能的干净 API 的最佳方式。
你有什么建议吗?
青春有我
慕森王
随时随地看视频慕课网APP
相关分类