         error: ( jqXHR, textStatus, errorThrown) ->
           switch jqXHR.status
             when 404 then dispatch(loadClusters()) # if requested cluster not found reload the whole list to see what we have
-            else dispatch(requestClusterFailure(jqXHR.responseText))
+            else
+              errorMessage =  if typeof jqXHR.responseJSON == 'object'
+                                JSON.parse(jqXHR.responseText).message
+                              else jqXHR.responseText
+              dispatch(requestClusterFailure(errorMessage))
 
 
 

        success: (data, textStatus, jqXHR) ->
          dispatch(fetchClusters())
        error: ( jqXHR, textStatus, errorThrown) ->
          dispatch(deleteClusterFailure(clusterName, errorThrown))


  deleteCluster = () ->

        success: (data, textStatus, jqXHR) ->
          dispatch(receiveClusters(data))
        error: ( jqXHR, textStatus, errorThrown) ->
          errorMessage =  if typeof jqXHR.responseJSON == 'object'
                            JSON.parse(jqXHR.responseText).message
                          else jqXHR.responseText

          dispatch(requestClustersFailure(errorMessage))



