hide detailed exception info in upload status (#3804)

This commit is contained in:
Albert Yi
2018-08-07 13:04:50 -07:00
parent 20e67814cb
commit 80e0ae6a3c
2 changed files with 4 additions and 0 deletions

View File

@@ -111,6 +111,7 @@ class UploadService
# we went through a lot of trouble normalizing the source,
# so don't overwrite it with whatever the user provided
pred.source = "" if pred.source.nil?
pred.attributes = self.params.except(:source)
# if a file was uploaded after the preprocessing occurred,

View File

@@ -9,6 +9,9 @@ class UploadPresenter < Presenter
dup_post_id = $1
template.link_to(@upload.status.gsub(/error: RuntimeError - /, ""), template.__send__(:post_path, dup_post_id))
when /\Aerror: /
@upload.status.gsub(/DETAIL:.+/m, "...")
else
@upload.status
end