Sha256: a553312ac32fb48d63351fff931fef89aac0ce81d1851310e82af992d48fb55e

Contents?: true

Size: 486 Bytes

Versions: 123

Compression:

Stored size: 486 Bytes

Contents

export const failureAction = (type, message = 'Request failed with status code 422') => (
  {
    type,
    payload: {
      messages: [message],
      result: new Error(message),
    },
  }
);

export const toastErrorAction = (message = 'Request failed with status code 422') => (
  {
    payload: {
      message: {
        message,
        sticky: true,
        type: 'error',
      },
    },
    type: 'TOASTS_ADD',
  }
);

export default {
  failureAction,
  toastErrorAction,
};

Version data entries

123 entries across 123 versions & 1 rubygems

Version Path
katello-3.15.0.rc1.2 webpack/services/api/testHelpers.js
katello-3.15.0.rc1.1 webpack/services/api/testHelpers.js
katello-3.15.0.rc1 webpack/services/api/testHelpers.js
katello-3.14.1 webpack/services/api/testHelpers.js
katello-3.13.4 webpack/services/api/testHelpers.js
katello-3.14.0 webpack/services/api/testHelpers.js
katello-3.13.3 webpack/services/api/testHelpers.js
katello-3.14.0.rc2 webpack/services/api/testHelpers.js
katello-3.13.2 webpack/services/api/testHelpers.js
katello-3.14.0.rc1 webpack/services/api/testHelpers.js
katello-3.13.1 webpack/services/api/testHelpers.js
katello-3.13.0 webpack/services/api/testHelpers.js
katello-3.13.0.rc2.1 webpack/services/api/testHelpers.js
katello-3.13.0.rc2 webpack/services/api/testHelpers.js
katello-3.12.3 webpack/services/api/testHelpers.js
katello-3.12.2 webpack/services/api/testHelpers.js
katello-3.13.0.rc1 webpack/services/api/testHelpers.js
katello-3.12.1 webpack/services/api/testHelpers.js
katello-3.11.2 webpack/services/api/testHelpers.js
katello-3.10.2 webpack/services/api/testHelpers.js