Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-api-middleware

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-api-middleware - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

lib/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc