Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyper-connect: attempting to GET deleted search doc returns 500 #7

Closed
tripott opened this issue Dec 3, 2021 · 2 comments · Fixed by #6
Closed

hyper-connect: attempting to GET deleted search doc returns 500 #7

tripott opened this issue Dec 3, 2021 · 2 comments · Fixed by #6
Assignees

Comments

@tripott
Copy link

tripott commented Dec 3, 2021

Attempting to GET a document from the search service that has been previously deleted throws an exception with a status of 500 instead of 404.

search: get: movie-1
{ err: { ok: false, status: 500 } }

export default async function (req, res) {
  // connecting to any service type named by the 'serviceinstancename' query string
  const serviceinstancename = pathOr('default', ['query', 'serviceinstancename'], req)
  const hyper = connect(process.env.HYPER, serviceinstancename)

  console.log('search: get: ', req.params.id)
  const result = await hyper.search.get(req.params.id).catch(err => {

    console.log({err})

  })
  console.log('search: get result', result)
  return res.send(result)
}
@TillaTheHun0
Copy link
Member

This seems like an issue with the elasticsearch adapter, and so should probably be transferred to that repo.

@TillaTheHun0
Copy link
Member

Potential fix here: #6

@TillaTheHun0 TillaTheHun0 transferred this issue from hyper63/hyper Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants