问题描述
我有一些看起来像这样的方法
def some_method
if params["status"] == "good"
some action
render json: {message: "action success"},status: 200
else
render json: {message: "The status is not good,try again later when the status is good"},status: 200
end
end
你看到当状态不好时,目前我返回 200 状态代码,这种情况下最好的状态代码是什么。是 400 还是 422?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)