Hi everyone! I have a problem with getRouteTable m...
# aws
Hi everyone! I have a problem with getRouteTable method ... I have this error
Copy code
Your query returned no results. Please change your search criteria and try again
hopefully the error explains itself. your query didn't return any results - can you share your code?
Copy code
let routeTableResult = [];
              subnetId: Elements,
              vpcId: id,
but with this query , I have not empty result and empty ... I want to avoid empty result
And I want to save values that not are empty
Then you should handle the error if it’s empty
okay! and how can i do this?
i'm not quite following what you're trying to do, really sorry. Can you elaborate a bit more?
@billowy-army-68599 I want to get the route tables with subnet id and vpc id filters. I want to save this result in an array to later work on it. I know that the query gives empty results and non-empty results, but I only want to save the non-empty results.
So… this array will have 1 item or be empty?
In any case, I’m not sure you would get the result you want here. The result of
is an
, which gets resolved asynchronously… so when you try to “save it for later”, things might not execute in the order you expect.
👍 1
If you share more of your code and an explanation of what you’re trying to do we might be able to help point you in the right direction.