Set query to error prop