diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-23 17:25:11 +0100 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-27 17:55:20 +0100 |
commit | 31a1ce2132d83e333e84f365b9aada2e17c61b43 (patch) | |
tree | 66d3a02000d2998f7b6f583ed669fd59939c88e7 /lib/api/api.rb | |
parent | 2e3dab38295b7c36ab100f20c654fdfaf9b00885 (diff) | |
download | gitlab-ce-31a1ce2132d83e333e84f365b9aada2e17c61b43.tar.gz |
Lock writes to trace stream
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r-- | lib/api/api.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb index 8e259961828..449faf5f8da 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -50,6 +50,10 @@ module API rack_response({ 'message' => '404 Not found' }.to_json, 404) end + rescue_from ::Gitlab::ExclusiveLeaseHelpers::FailedToObtainLockError do + rack_response({ 'message' => '409 Conflict: Resource lock' }.to_json, 409) + end + rescue_from UploadedFile::InvalidPathError do |e| rack_response({ 'message' => e.message }.to_json, 400) end |