The good news is that if you're getting requests from your query, then your query is probably not the problem. Your story premise is intriguing and your query is well written.
But what if you're not getting any bites from your query? Your gut instinct may be that something is wrong with your query. That certainly could be the case, so your first step will be to get tons of feedback on your query and rewrite, and repeat.
So, now say that you've gotten feedback and re-written and your query is polished, but you're still not getting requests. What if the problem is actually your story?
I ran into this issue with a previous manuscript I was querying. I rewrote the heck out of that thing, and got it as polished as I could, but it still wasn't getting much attention from agents. However, when I wrote a better manuscript, the query came so much easier.
So, how do you know when you need to set aside your query and make changes to your manuscript? Here are some clues I noticed:
1. You've worked HARD on your query and it's still not as good as you'd like it to be. It's almost impossible to work too hard on your query, but it's possible. I think I did. You should read as much as you can about how to write a query, get tons of feedback, and re-write your query many, many times. But if you have done all that and your query is still not working for you, pat yourself on the back for a job well done on your query, and then get back to work on your manuscript.
2. Feedback about your query is lukewarm and nonspecific. If feedback about your query is negative and has specific suggestions about parts that are confusing or mistakes you've made a about query structure, you should re-write your query. If people are out of specific criticism but still aren't blown away, you might have written your query as well as possible and the problem lies elsewhere.
3. Laying out your main character's motivation and conflict is anything less than extremely easy. The fact is that the basics of your plot should be extremely easy to describe, and NOT because it makes for a better high concept Twitter pitch. If the central conflict isn't well defined, you have a problem with your manuscript.
4. Describing your genre is anything less than extremely easy. Okay, this is a tough one for me. My novel, The Charge, was New Adult before New Adult was really a thing, so I don't believe you should put aside your manuscript just because it's hard to categorize. But you still need to be well-informed about where your novel fits within the genre spectrum. If you don't know what genre to call your novel in the query, step back and examine your manuscript and pin down the genre before you query.