svrcekmichal/redux-axios-middleware

Middleware options doesn't seems to work

rmariuzzo opened this issue · 1 comments

I have the following code.

import axios from 'axios'
import axiosMiddleware from 'redux-axios-middleware'

const client = axios.create({
  baseURL: 'http://api.dev',
  responseType: 'json'
})

const options = {
  successSuffix: 'success',
  errorFix: 'error'
}

export default axiosMiddleware(client, options)

When I dispatch an action as { type: 'load' } then I get { type: 'load_FAIL' }. I expected to get { type: 'load_error' }.

Just found the typo: errorFix should be errorSuffix.