Remove spurious trailing uri slash
handle_request with conditionally built query