summaryrefslogtreecommitdiff
path: root/lib/api/repositories.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/repositories.rb')
-rw-r--r--lib/api/repositories.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb
index c3632c812f3..2e21f591667 100644
--- a/lib/api/repositories.rb
+++ b/lib/api/repositories.rb
@@ -248,6 +248,8 @@ module API
changelog = service.execute(commit_to_changelog: false)
present changelog, with: Entities::Changelog
+ rescue Gitlab::Changelog::Error => ex
+ render_api_error!("Failed to generate the changelog: #{ex.message}", 422)
end
desc 'Generates a changelog section for a release and commits it in a changelog file' do