decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.89k stars 3.04k forks source link

Wrong action type on queryFailure action creator #2163

Open leonardodino opened 5 years ago

leonardodino commented 5 years ago

Describe the bug: probably just a typo: (success type on failure action creator)

https://github.com/netlify/netlify-cms/blob/f801b192211b1e1953ced969a3093eab9e04e14d/packages/netlify-cms-core/src/actions/search.js#L75-L77

although, the failure handler is missing from search reducer. idk what is the expected response to a failed query.

To Reproduce: possible bug, but never happened to me.

Expected behavior: ¯\_(ツ)_/¯

Applicable Versions: always there, since this feature was added in #186

Additional context

was just reading through code, while solving some of race-conditions I introduced in my fork.

erquhart commented 5 years ago

I'm guessing we just didn't implement meaningful error handling yet, so reused the success action.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

erquhart commented 4 years ago

We do expect a response object with a hits key in the reducer, so this is a bug waiting to happen.