From e97842a436b032c4e274494d54cdc57a94b11f9a Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 28 Jun 2013 16:31:48 +0200 Subject: [PATCH] SONAR-4458 Bad error message in /api/violations when parameters scopes, qualifiers or depth are used --- .../WEB-INF/app/controllers/api/violations_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb index a0e35c8fe9c..17fda72c5b6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/violations_controller.rb @@ -24,11 +24,11 @@ class Api::ViolationsController < Api::ApiController conditions={} if params['scopes'] - rest_error('The parameter "scopes" is not supported since version 3.6.') + return render_error("The parameter 'scopes' is not supported since version 3.6.", 400) end if params['qualifiers'] - rest_error('The parameter "qualifiers" is not supported since version 3.6.') + return render_error("The parameter 'qualifiers' is not supported since version 3.6.", 400) end resource = params[:resource] @@ -37,7 +37,7 @@ class Api::ViolationsController < Api::ApiController if depth==0 conditions['components'] = resource elsif depth>0 - rest_error('The parameter "depth" is not supported since version 3.6.') + return render_error("The parameter 'depth' is not supported since version 3.6.", 400) else # negative : all the resource tree conditions['componentRoots'] = resource -- 2.39.5