5182: Improve error reporting in uploader.
authorTom Clegg <tom@curoverse.com>
Tue, 10 Mar 2015 06:58:58 +0000 (02:58 -0400)
committerTom Clegg <tom@curoverse.com>
Tue, 10 Mar 2015 07:00:10 +0000 (03:00 -0400)
commit8c473f086b705d55132286cd2a276bcf67a15558
tree70362ad85005c321bc236e61ead77ae719cfa8de
parent4d71b77be419a60d8dd64d16ebeb4b83be5cb97d
5182: Improve error reporting in uploader.

Missing CORS headers (and network errors which force the browser to
assume CORS headers are missing) are reported as error==="". In place
of the enigmatic "error:", we show a message hinting at network/CORS
problems and pointing the user to the browser debug console for
further clues.

Mixed-content errors (https://workbench/*.js attempts AJAX request at
http://proxy/*) don't invoke success/fail handlers at all, so we catch
them ahead of time and show an appropriate message.
apps/workbench/app/assets/javascripts/upload_to_collection.js
apps/workbench/test/integration/collection_upload_test.rb