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

silent fail if a query is attempted on a service without also providing actions from that service #5

Open
iainkirkpatrick opened this issue Sep 25, 2017 · 1 comment

Comments

@iainkirkpatrick
Copy link
Member

just found this as the cause of my bug today 😅

i was trying to query against the relationships service using a query object like

queries.push({
  service: 'relationships',
  params: {
    query: {
      sourceId: currentAgent.id
    }
  }
})

without ALSO passing in relevant relationships actions into the actions object of connect. The result was React silently handling the fail (of the componentDidMount i think?) but to the user of feathers-action-react it just appears as if the query is never executed.

i'd write a PR for this, but unsure how you would want this to throw @ahdinosaur :) can discuss tomorrow perhaps?

@ahdinosaur
Copy link
Member

oh nice!

i'd write a PR for this, but unsure how you would want this to throw

this is a programmer error, so throw as LOUDLY as possible. like throw new Error(...), or whatever makes it obvious what is happening to the programmer who is debugging this. unfortunately i don't see how we can detect this upfront.

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

No branches or pull requests

2 participants