You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2022/10/18 13:10:32 UTC
[airflow] 16/41: Allow retrieving error message from data.detail (#26762)
This is an automated email from the ASF dual-hosted git repository.
ephraimanierobi pushed a commit to branch v2-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit efe11425415253c6b4328b848c1fb9019c1399fc
Author: pierrejeambrun <pi...@gmail.com>
AuthorDate: Thu Sep 29 16:06:52 2022 +0200
Allow retrieving error message from data.detail (#26762)
(cherry picked from commit bec80af0718e44212d02a969a65d3201648735f4)
---
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 f361af0491..4ee0a085e5 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;
}