Skip to content
代码片段 群组 项目
未验证 提交 bd3409b5 编辑于 作者: Julie Huang's avatar Julie Huang
浏览文件

Rescue ActiveRecord errors

With the previous logic, errors were not being surfaced correctly. When there is an ActiveRecord error (i.e bad params that don't meet validation), then the create action is rolled back and no record will exist (can't parse errors on a nil object). This will cause a 500 error. Rescueing the error means it can be surfaced through the resolver and handled appropriately by the client.
上级 4f41b8df
No related branches found
No related tags found
加载中
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册