hunk.code_window:       header?.key?.trim().toLowerCase() === CONTENT_TYPE_HEADER_KEY,
     );
     // GET actions should not save body if the content-type is set to empty
     // In all other scenarios, GET requests will save & execute the action with
     // the request body
  
hunk.labels: keep keep add keep keep keep
hunk.after_edit:   const autoGeneratedContentTypeHeaderIndex = actionConfigurationAutoGeneratedHeaders.findIndex(
       (header: { key: string; value: string }) =>
         header?.key?.trim().toLowerCase() === CONTENT_TYPE_HEADER_KEY,
     );
  
hunk.file_path: app/client/src/transformers/RestActionTransformer.ts
hunk.type: add
file: import { ActionCalledInSyncFieldError } from "workers/Evaluation/errorModifier";
  
  export function addFn(
    ctx: any,
    fnName: string,
    fn: (...args: any[]) => any,
    fnGuards = [isAsyncGuard],
  ) {
    Object.defineProperty(ctx, fnName, {
      value: function(...args: any[]) {
        for (const guard of fnGuards) {
          fn = guard(fn, fnName);
        }
        return fn(...args);
      },
      enumerable: false,
      writable: true,
      configurable: true,
    });
  }
  
  export function isAsyncGuard<P extends ReadonlyArray<unknown>>(
    fn: (...args: P) => unknown,
    fnName: string,
  ) {
    return (...args: P) => {
      if (!self.$isDataField) return fn(...args);
      self["$isAsync"] = true;
      throw new ActionCalledInSyncFieldError(fnName);
    };
  }
  