<commit_before>import {
  call,
  takeEvery,
  put,
  all,
  cancelled,
  getContext,
  setContext,
} from 'redux-saga/effects';

import { success, error, abort } from './actions';
import {
  REQUEST_INSTANCE,
  REQUESTS_CONFIG,
  INCORRECT_PAYLOAD_ERROR,
} from './constants';

export const voidCallback = () => {};

const isFSA = action => !!action.payload;

export const successAction = (action, data) => ({
  ...(isFSA(action)
    ? {
        payload: {
          data,
        },
      }
    : {
        data,
      }),
  meta: {
    ...action.meta,
    requestAction: action,
  },
});

export const errorAction = (action, errorData) => ({
  ...(isFSA(action)
    ? {
        payload: errorData,
        error: true,
      }
    : {
        error,
      }),
  meta: {
    ...action.meta,
    requestAction: action,
  },
});

export const abortAction = action => ({
  meta: {
    ...action.meta,
    requestAction: action,
  },
});

export const defaultConfig = {
  driver: null,<commit_msg>Fixed errorAction erro payload<commit_after>import {
  call,
  takeEvery,
  put,
  all,
  cancelled,
  getContext,
  setContext,
} from 'redux-saga/effects';

import { success, error, abort } from './actions';
import {
  REQUEST_INSTANCE,
  REQUESTS_CONFIG,
  INCORRECT_PAYLOAD_ERROR,
} from './constants';

export const voidCallback = () => {};

const isFSA = action => !!action.payload;

export const successAction = (action, data) => ({
  ...(isFSA(action)
    ? {
        payload: {
          data,
        },
      }
    : {
        data,
      }),
  meta: {
    ...action.meta,
    requestAction: action,
  },
});

export const errorAction = (action, errorData) => ({
  ...(isFSA(action)
    ? {
        payload: errorData,
        error: true,
      }
    : {
        error: errorData,
      }),
  meta: {
    ...action.meta,
    requestAction: action,
  },
});

export const abortAction = action => ({
  meta: {
    ...action.meta,
    requestAction: action,
  },
});

export const defaultConfig = {
  driver: null,
{'fraction_non_alphanumeric': 0.15609514370664024, 'fraction_numerical': 0.0, 'mean_word_length': 2.261712439418417, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2127331', 'n_tokens_mistral': 681, 'n_tokens_neox': 678, 'n_words': 143}