结果:在 afterSave 和 beforeSave 上未捕获空值 [英] Result: Uncaught null on afterSave and beforeSave

查看:45
本文介绍了结果:在 afterSave 和 beforeSave 上未捕获空值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如标题所示,我在触发不同的云代码挂钩时经常遇到此错误.

As the title suggests, I'm encountering this error fairly often when triggering different cloud code hooks.

钩子本身的代码范围从简单(5 loc)到更复杂(100 loc).

The code of the hooks themselves range from simple (5 loc) to more complex (100 loc).

错误输出只是Result: Uncaught null",没有堆栈跟踪,没有任何东西.

The error output is just that "Result: Uncaught null", no stack trace no anything.

有人遇到过这个问题吗?这尤其具有破坏性,因为它阻止了一些保存的发生.

Has anyone encountered this issue? It's particularly damaging since it's preventing some saves from occurring.

推荐答案

我发现Result: Uncaught null"通常是触发器中没有返回任何内容的结果.您不一定需要在 afterSave 中返回任何内容,但您需要在 beforeSave 中返回,否则一切都会挂起.

I've found that "Result: Uncaught null" is often the result of not returning anything in your trigger. You don't necessarily need to return anything in an afterSave, but you do in the beforeSave or else everything will hang.

这篇关于结果:在 afterSave 和 beforeSave 上未捕获空值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆