From 81092df58a8e162beeb9cfff0ed3716d5f6b70c2 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Wed, 25 May 2022 16:47:07 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E6=8B=A6=E6=88=AA=E5=99=A8?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/http-interceptors/base-interceptor.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/http-interceptors/base-interceptor.ts b/src/app/http-interceptors/base-interceptor.ts index f2f0af6..3abce58 100644 --- a/src/app/http-interceptors/base-interceptor.ts +++ b/src/app/http-interceptors/base-interceptor.ts @@ -84,14 +84,15 @@ export class BaseInterceptor implements HttpInterceptor { this.message.create('error', `请核对您的输入信息或格式是否正确!`); } if (error.status === 500) { - this.message.create('error', `状态500,服务器错误!${error.error.message}`); + // console.log('xxxx',error) + this.message.create('error', `状态500,服务器错误!${error.error.error.message}`); } if (error.status === 404) { - this.message.create('error', `实体未找到!`); + this.message.create('error', `实体未找到!${error.error.error.message}`); } if (error.error instanceof ErrorEvent) { // 发生客户端或网络错误。相应处理。 - console.error('An error occurred:', error.error.message); + console.error('An error occurred:', error.error.error.message); } else { // 服务端返回http状态码 // 服务端返回错误信息