From: simonbrandhof Date: Sun, 30 Oct 2011 16:56:14 +0000 (+0100) Subject: SONAR-2424 improve error handling of URL /profiles/export X-Git-Tag: 2.12~78 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=78b881723924a12de22e339537ffad426fa853cd;p=sonarqube.git SONAR-2424 improve error handling of URL /profiles/export --- 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