From 78b881723924a12de22e339537ffad426fa853cd Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Sun, 30 Oct 2011 17:56:14 +0100 Subject: [PATCH] SONAR-2424 improve error handling of URL /profiles/export --- .../main/webapp/WEB-INF/app/controllers/profiles_controller.rb | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.39.5