diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-10-30 17:56:14 +0100 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-10-30 17:56:14 +0100 |
commit | 78b881723924a12de22e339537ffad426fa853cd (patch) | |
tree | 7efb750b8239b0f1e5d4f091493263178ab78fd1 /sonar-server | |
parent | 33b76a14b9be14e23c25f913bca74607f4205175 (diff) | |
download | sonarqube-78b881723924a12de22e339537ffad426fa853cd.tar.gz sonarqube-78b881723924a12de22e339537ffad426fa853cd.zip |
SONAR-2424 improve error handling of URL /profiles/export
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb index 9f5b1e8ca82..d7872c7d440 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb @@ -180,7 +180,10 @@ class ProfilesController < ApplicationController else profile = Profile.find_by_name_and_language(CGI::unescape(params[:name]), language) end + not_found('Profile not found') unless profile + if (params[:format].blank?) + # standard sonar format result = java_facade.backupProfile(profile.id) send_data(result, :type => 'text/xml', :disposition => 'inline') else |