diff options
-rw-r--r-- | lib/api/commits.rb | 2 | ||||
-rw-r--r-- | lib/api/files.rb | 4 | ||||
-rw-r--r-- | lib/api/groups.rb | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb index 1aea6943000..8e528e266bf 100644 --- a/lib/api/commits.rb +++ b/lib/api/commits.rb @@ -108,7 +108,7 @@ module API if note.save present note, with: Entities::CommitNote else - error!("Failed to save note", 422) + render_api_error!("Failed to save note #{note.errors.messages}", 422) end end end diff --git a/lib/api/files.rb b/lib/api/files.rb index 84e1d311781..e6e71bac367 100644 --- a/lib/api/files.rb +++ b/lib/api/files.rb @@ -35,7 +35,7 @@ module API file_path = attrs.delete(:file_path) commit = user_project.repository.commit(ref) - not_found! "Commit" unless commit + not_found! 'Commit' unless commit blob = user_project.repository.blob_at(commit.sha, file_path) @@ -53,7 +53,7 @@ module API commit_id: commit.id, } else - render_api_error!('File not found', 404) + not_found! 'File' end end diff --git a/lib/api/groups.rb b/lib/api/groups.rb index a2d915a7eca..cee51c82ad5 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -54,7 +54,7 @@ module API if @group.save present @group, with: Entities::Group else - not_found! + render_api_error!("Failed to save group #{@group.errors.messages}", 422) end end @@ -97,7 +97,7 @@ module API if result present group else - not_found! + render_api_error!("Failed to transfer project #{project.errors.messages}", 422) end end end |