redux-api-middleware
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -177,3 +177,3 @@ /** | ||
type: failureType, | ||
payload: error.message || 'Something bad happened', | ||
payload: error, | ||
error: true | ||
@@ -180,0 +180,0 @@ })); |
{ | ||
"name": "redux-api-middleware", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Redux middleware for calling an API.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -129,3 +129,3 @@ redux-api-middleware | ||
- If the request is successful, an FSA with the `SUCCESS` type is dispatched to the next middleware; the `payload` property of this FSA is a merge of the original RSAA's `payload` property and the JSON response from the server; the `meta` property of this FSA is that of the original RSAA. | ||
- If the request is unsuccessful, an FSA with the `FAILURE` type is dispatched to the next middleware; the `payload` property of this FSA is set to the error message of the request (or the string `Something bad happened` if the latter is empty); the `meta` property of this FSA is the same as that of the original RSAA; the `error` property of this FSA is set to `true`. | ||
- If the request is unsuccessful, an FSA with the `FAILURE` type is dispatched to the next middleware; the `payload` property of this FSA is set to the error object of the request; the `meta` property of this FSA is the same as that of the original RSAA; the `error` property of this FSA is set to `true`. | ||
@@ -204,3 +204,3 @@ If the incoming action does not contain a `[CALL_API]` key, it is passed to the next middleware without any modifications. | ||
type: 'FETCH_USER.FAILURE', | ||
payload: error.message, | ||
payload: error, | ||
meta: { someMeta } | ||
@@ -207,0 +207,0 @@ error: true |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15887