Skip to content

Commit

Permalink
Allow retrieving error message from data.detail (#26762)
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrejeambrun authored Sep 29, 2022
1 parent b6c5189 commit bec80af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airflow/www/static/js/utils/useErrorToast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bec80af

Please sign in to comment.