pierrejeambrun commented on code in PR #61588:
URL: https://github.com/apache/airflow/pull/61588#discussion_r2959035471
##########
airflow-core/src/airflow/ui/src/queries/useDagParsing.ts:
##########
@@ -25,15 +25,15 @@ import {
UseDagSourceServiceGetDagSourceKeyFn,
} from "openapi/queries";
import { toaster } from "src/components/ui";
-import { createErrorToaster } from "src/components/ui/createErrorToaster";
+import { createErrorToaster } from "src/utils";
export const useDagParsing = ({ dagId }: { readonly dagId: string }) => {
const queryClient = useQueryClient();
- const { t: translate } = useTranslation(["dag", "common"]);
- const onError = createErrorToaster(translate, {
- description: translate("parse.toaster.error.description"),
- title: translate("parse.toaster.error.title"),
- });
+ const { t: translate } = useTranslation("dag");
+
+ const onError = (error: unknown) => {
+ createErrorToaster(error, { titleKey: "dag:parse.toaster.error.title" },
translate);
+ };
Review Comment:
Weird that the CI doesn't detect dead code
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]