handle edge case of invalid query params