Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorChantal Rollison <crollison@gitlab.com>2018-09-05 16:24:06 +0300
committerChantal Rollison <crollison@gitlab.com>2018-09-06 16:33:32 +0300
commitd2161350cc8f8fc5fd9b486a07d518e76a76cde7 (patch)
tree3c4889e3f6c88d16d574a5a0e230c62d504e2bc3 /app
parentc691e07a7bafe51322e6a1ea5ec78fdc426d384c (diff)
Handled exception during file upload
Diffstat (limited to 'app')
-rw-r--r--app/controllers/concerns/uploads_actions.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/concerns/uploads_actions.rb b/app/controllers/concerns/uploads_actions.rb
index 434459a225a..bb8c245a5b7 100644
--- a/app/controllers/concerns/uploads_actions.rb
+++ b/app/controllers/concerns/uploads_actions.rb
@@ -53,6 +53,8 @@ module UploadsActions
maximum_size: Gitlab::CurrentSettings.max_attachment_size.megabytes.to_i)
render json: authorized
+ rescue SocketError
+ render json: "Error uploading file", status: :internal_server_error
end
private