More explicit exceptions, and support of validating query_params