如何更改drupal 8 REST API核心消息

时间:2017-05-03 05:37:26

标签: drupal drupal-8

我正在使用以下 PATCH 请求来更新密码:

{
  "_links": {
    "type": {
      "href": "{url}/rest/type/user/user"
    }
  },
  "pass": [
    {
    "existing":"admin",
    "value":"123456789"
    }]
}

如果现有密码错误,则drupal会返回

之类的消息
Unprocessable Entity: validation failed.pass: Your current password is missing or incorrect; it's required to change the Password.

我想删除这个" 不可处理的实体:"东西,并希望向用户显示明确的信息,如

Your current password is missing or incorrect; it's required to change the Password.

任何帮助都非常感谢。

0 个答案:

没有答案