]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2424 improve error handling of URL /profiles/export
authorsimonbrandhof <simon.brandhof@gmail.com>
Sun, 30 Oct 2011 16:56:14 +0000 (17:56 +0100)
committersimonbrandhof <simon.brandhof@gmail.com>
Sun, 30 Oct 2011 16:56:14 +0000 (17:56 +0100)
sonar-server/src/main/webapp/WEB-INF/app/controllers/profiles_controller.rb

index 9f5b1e8ca82966017f957e07d4c7474b8e402d32..d7872c7d4408b3faadae46d1913f1175562308e6 100644 (file)
@@ -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