From 221ce1d9ed7efbac2f323e4f9f8e48376fe7be67 Mon Sep 17 00:00:00 2001 From: Justin Littman Date: Mon, 9 Dec 2019 12:21:29 -0500 Subject: [PATCH] Fixes QA error message. closes #1979 --- __tests__/actionCreators/search.test.js | 2 +- src/actionCreators/search.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/actionCreators/search.test.js b/__tests__/actionCreators/search.test.js index d79f802b6..1ab655d47 100644 --- a/__tests__/actionCreators/search.test.js +++ b/__tests__/actionCreators/search.test.js @@ -162,7 +162,7 @@ describe('fetchQASearchResults', () => { totalResults: 0, options: {}, facetResults: undefined, - error: { message: 'Ooops...' }, + error: 'Ooops...', }, }) }) diff --git a/src/actionCreators/search.js b/src/actionCreators/search.js index d31fb3351..8e285c5a8 100644 --- a/src/actionCreators/search.js +++ b/src/actionCreators/search.js @@ -15,7 +15,7 @@ export const fetchQASearchResults = (query, uri, options = {}) => (dispatch) => return searchPromise.then((response) => { if (response.isError) { - dispatch(setSearchResults(uri, [], 0, undefined, query, options, { message: response.errorObject.message })) + dispatch(setSearchResults(uri, [], 0, undefined, query, options, response.errorObject.message)) } else { dispatch(setSearchResults(uri, response.body.results, response.body.response_header.total_records, undefined, query, options)) }