5182: Tweak error messages.
authorTom Clegg <tom@curoverse.com>
Tue, 10 Mar 2015 19:44:45 +0000 (15:44 -0400)
committerTom Clegg <tom@curoverse.com>
Tue, 10 Mar 2015 19:44:45 +0000 (15:44 -0400)
apps/workbench/app/assets/javascripts/upload_to_collection.js
apps/workbench/test/integration/collection_upload_test.rb

index 58ac3feb8392b1a50e79e2e41b3993ef4f347dd4..55f562d9364f4f7f5b787eda7366eee2d13343e9 100644 (file)
@@ -65,7 +65,7 @@ function UploadToCollection($scope, $filter, $q, $timeout,
     ////////////////////////////////
 
     var keepProxy;
-    var defaultErrorMessage = 'A network error occurred, or there is a CORS configuration problem. Please check your browser debug console for a more specific error message (browser security features prevent us from showing the details here).';
+    var defaultErrorMessage = 'A network error occurred: either the server was unreachable, or there is a server configuration problem. Please check your browser debug console for a more specific error message (browser security features prevent us from showing the details here).';
 
     function SliceReader(_slice) {
         var that = this;
@@ -127,7 +127,7 @@ function UploadToCollection($scope, $filter, $q, $timeout,
                 // give up now.
                 _deferred.reject({
                     textStatus: 'error',
-                    err: 'server setup problem (proxy ' + proxyUriBase() + ' cannot be used from origin ' + window.location.origin + ')'
+                    err: 'There is a server configuration problem. Proxy ' + proxyUriBase() + ' cannot be used from origin ' + window.location.origin + ' due to the browser\'s mixed-content (https/http) policy.'
                 });
             } else {
                 goSend();
index 3f201b748c014440d45484fef3692696a1b3f7b6..38b60267edde70a8ae11ed288d7eef3d86ce5094 100644 (file)
@@ -86,7 +86,7 @@ class CollectionUploadTest < ActionDispatch::IntegrationTest
     end
   end
 
-  test "Report CORS problem or network error" do
+  test "Report network error" do
     need_selenium "to make file uploads work"
     begin
       use_token :admin
@@ -100,7 +100,6 @@ class CollectionUploadTest < ActionDispatch::IntegrationTest
     assert_selector 'button:not([disabled])', text: 'Start'
     click_button 'Start'
     using_wait_time 5 do
-      assert_text :visible, 'CORS'
       assert_text :visible, 'network error'
     end
   end