diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-18 12:24:53 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-01-18 12:30:01 +0100 |
commit | 9ce8aa31f2f55563cbf4212f7dd2b51576967a55 (patch) | |
tree | 256f5f0a00ec166e3d71ef11e9e0e57bd072906d /lib/api | |
parent | 53f4f849956e10ccbbf4a9011b46b84da33129b0 (diff) | |
download | gitlab-ce-9ce8aa31f2f55563cbf4212f7dd2b51576967a55.tar.gz |
Respond with validation errors in commit status APIfix/external-status-badge-links
If validation errors are present, include validation errors in the
commit status API payload, instead of depending on state machine errors
caused by invalid record.
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/commit_statuses.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb index 4bbdf06a49c..b6e6820c3f4 100644 --- a/lib/api/commit_statuses.rb +++ b/lib/api/commit_statuses.rb @@ -78,6 +78,8 @@ module API description: params[:description] ) + render_validation_error!(status) if status.invalid? + begin case params[:state] when 'pending' |