Skip to content

Commit

Permalink
do not camelcase xcom entries (#42182) (#42187)
Browse files Browse the repository at this point in the history
(cherry picked from commit 70e9852)

Co-authored-by: Brent Bovenzi <[email protected]>
  • Loading branch information
2 people authored and ephraimbuddy committed Sep 13, 2024
1 parent 9de0e59 commit 80047e3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions airflow/www/static/js/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,14 @@ axios.interceptors.request.use((config) => {
return config;
});

axios.interceptors.response.use((res: AxiosResponse) =>
res.data ? camelcaseKeys(res.data, { deep: true }) : res
);
// Do not camelCase xCom entry results
axios.interceptors.response.use((res: AxiosResponse) => {
const stopPaths = [];
if (res.config.url?.includes("/xcomEntries/")) {
stopPaths.push("value");
}
return res.data ? camelcaseKeys(res.data, { deep: true, stopPaths }) : res;
});

axios.defaults.headers.common.Accept = "application/json";

Expand Down

0 comments on commit 80047e3

Please sign in to comment.