Angular 422角度8中的不可处理实体

Angular 422角度8中的不可处理实体,angular,angular8,phoenix-framework,Angular,Angular8,Phoenix Framework,我试图将数据从localhost:4200上的Angular 8放到localhost:4000上的API中。在Postman中,验证错误消息正在工作,但无法处理实体。在如何获取错误消息“{”errors”:{“phone”:[“has has behave”]}”中,显示在postman中 加载资源失败:服务器响应状态为422(不可处理实体) 角度服务api: updateCustomer(id: string, any: any): Observable<any>

我试图将数据从localhost:4200上的Angular 8放到localhost:4000上的API中。在Postman中,验证错误消息正在工作,但无法处理实体。在如何获取错误消息“{”errors”:{“phone”:[“has has behave”]}”中,显示在postman中

加载资源失败:服务器响应状态为422(不可处理实体)

角度服务api:

        updateCustomer(id: string, any: any): Observable<any> {
        const url = http://127.0.0.1:4000/admin/users/${id}`;
        return this.http.put(url, any).pipe(
            map(
                res => {
                    return res;
                }
            )
        );
    }

    update(): void {
    let data = { user: this.customerForm.value }
    this.apiService.updateCustomer(this.id, data)
      .subscribe(
        (data) => console.log(data),
        (error) => console.log(error)
      );
  }
updateCustomer(id:string,any:any):可观察

控制台日志:(仅获取“确定”)

zone evergreen.js:2952 PUT 422
customer form.component.ts:106 OK

邮递员也收到了422个无法处理的实体(在图片的右上方区域)。这不是错误消息,而是后端返回的Http状态。是的,在如何获取错误消息“{”errors”:{“phone”:[“has has behave”]}”中显示在postman中。它应该封装在错误回调中的
error
对象中。你能告诉我们登录到控制台的get是什么吗?只获取“OK”的邮递员也收到了422个不可处理的实体(在你的图片的右上方区域)。这不是错误消息,而是后端返回的Http状态。是的,在如何获取错误消息“{”errors”:{“phone”:[“has has behave”]}”中显示在postman中。它应该封装在错误回调中的
error
对象中。你能告诉我们控制台上记录了什么吗?只记录“OK”