-
+
{item.name}
{item.description}
diff --git a/packages/unleash-frontend-next/src/component/feature/form/strategy-configure.jsx b/packages/unleash-frontend-next/src/component/feature/form/strategy-configure.jsx
index ca217cd392..fdef8863ce 100644
--- a/packages/unleash-frontend-next/src/component/feature/form/strategy-configure.jsx
+++ b/packages/unleash-frontend-next/src/component/feature/form/strategy-configure.jsx
@@ -53,7 +53,7 @@ class StrategyConfigure extends React.Component {
render () {
const leftActions = [
- ,
+ ,
];
if (!this.props.strategyDefinition) {
diff --git a/packages/unleash-frontend-next/src/store/error-store.js b/packages/unleash-frontend-next/src/store/error-store.js
index 2c16f5a6f3..c2bccde45d 100644
--- a/packages/unleash-frontend-next/src/store/error-store.js
+++ b/packages/unleash-frontend-next/src/store/error-store.js
@@ -1,6 +1,10 @@
import { List, Map as $Map } from 'immutable';
-import { ERROR_RECEIVE_FEATURE_TOGGLES } from './feature-actions';
import { MUTE_ERRORS } from './error-actions';
+import {
+ ERROR_RECEIVE_FEATURE_TOGGLES,
+ ERROR_CREATING_FEATURE_TOGGLE,
+} from './feature-actions';
+
const debug = require('debug')('unleash:error-store');
function getInitState () {
@@ -12,10 +16,11 @@ function getInitState () {
const strategies = (state = getInitState(), action) => {
switch (action.type) {
+ case ERROR_CREATING_FEATURE_TOGGLE:
case ERROR_RECEIVE_FEATURE_TOGGLES:
debug('Got error', action);
return state
- .update('list', (list) => list.push('Failed fetching feature toggles'))
+ .update('list', (list) => list.push(action.errorMsg))
.set('showError', true);
case MUTE_ERRORS:
debug('muting errors');
diff --git a/packages/unleash-frontend-next/src/store/feature-actions.js b/packages/unleash-frontend-next/src/store/feature-actions.js
index 309e65cb0d..9f6cabdaf1 100644
--- a/packages/unleash-frontend-next/src/store/feature-actions.js
+++ b/packages/unleash-frontend-next/src/store/feature-actions.js
@@ -28,10 +28,11 @@ function updateFeatureToggle (featureToggle) {
};
};
-function errorCreatingFeatureToggle (statusCode) {
+function errorCreatingFeatureToggle (error) {
return {
type: ERROR_CREATING_FEATURE_TOGGLE,
- statusCode,
+ statusCode: error.statusCode,
+ errorMsg: error.msg,
receivedAt: Date.now(),
};
}
diff --git a/packages/unleash-frontend-next/src/store/feature-api.js b/packages/unleash-frontend-next/src/store/feature-api.js
index 27f3de02eb..7e2b8e4d27 100644
--- a/packages/unleash-frontend-next/src/store/feature-api.js
+++ b/packages/unleash-frontend-next/src/store/feature-api.js
@@ -8,7 +8,8 @@ const headers = {
function throwIfNotSuccess (response) {
if (!response.ok) {
let error = new Error('API call failed');
- error.status = response.status;
+ error.statusCode = response.status;
+ error.msg = response.json();
throw error;
}
return response;