From bec80af0718e44212d02a969a65d3201648735f4 Mon Sep 17 00:00:00 2001 From: pierrejeambrun Date: Thu, 29 Sep 2022 16:06:52 +0200 Subject: [PATCH] Allow retrieving error message from data.detail (#26762) --- airflow/www/static/js/utils/useErrorToast.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/www/static/js/utils/useErrorToast.ts b/airflow/www/static/js/utils/useErrorToast.ts index f361af0491945c..4ee0a085e5a9df 100644 --- a/airflow/www/static/js/utils/useErrorToast.ts +++ b/airflow/www/static/js/utils/useErrorToast.ts @@ -28,7 +28,7 @@ export const getErrorDescription = (error?: ErrorType, fallbackMessage?: string) if (error instanceof Error) { let { message } = error; if (axios.isAxiosError(error)) { - message = error.response?.data || error.message; + message = error.response?.data?.detail || error.response?.data || error.message; } return message; }