hide detailed exception info in upload status (#3804)
This commit is contained in:
@@ -111,6 +111,7 @@ class UploadService
|
|||||||
|
|
||||||
# we went through a lot of trouble normalizing the source,
|
# we went through a lot of trouble normalizing the source,
|
||||||
# so don't overwrite it with whatever the user provided
|
# so don't overwrite it with whatever the user provided
|
||||||
|
pred.source = "" if pred.source.nil?
|
||||||
pred.attributes = self.params.except(:source)
|
pred.attributes = self.params.except(:source)
|
||||||
|
|
||||||
# if a file was uploaded after the preprocessing occurred,
|
# if a file was uploaded after the preprocessing occurred,
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ class UploadPresenter < Presenter
|
|||||||
dup_post_id = $1
|
dup_post_id = $1
|
||||||
template.link_to(@upload.status.gsub(/error: RuntimeError - /, ""), template.__send__(:post_path, dup_post_id))
|
template.link_to(@upload.status.gsub(/error: RuntimeError - /, ""), template.__send__(:post_path, dup_post_id))
|
||||||
|
|
||||||
|
when /\Aerror: /
|
||||||
|
@upload.status.gsub(/DETAIL:.+/m, "...")
|
||||||
|
|
||||||
else
|
else
|
||||||
@upload.status
|
@upload.status
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user