我在Rails3应用程序上添加了一个API,它非常好用.但我在http://developer.github.com/v3/看到了以下Github api v3
HTTP/1.1 422 Unprocessable Entity
Content-Length: 149
{
"message": "Validation Failed",
"errors": [
{
"resource": "Issue",
"field": "title",
"code": "missing_field"
}
]
}
Run Code Online (Sandbox Code Playgroud)
我喜欢错误消息结构.但无法让它重现.我怎样才能让我的apis做出类似的回应?