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)) }