diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2015-01-07 10:46:00 +0100 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2015-01-07 10:46:00 +0100 |
commit | cd0aed3d54fc01d0c361a8cf282d2de48297f66a (patch) | |
tree | 9bd4d1a97827d95ad9e854ec5215dddfa1c953b9 /lib/api/deploy_keys.rb | |
parent | 0da5154b5a71216a9bbff861561636906ca8c167 (diff) | |
download | gitlab-ce-cd0aed3d54fc01d0c361a8cf282d2de48297f66a.tar.gz |
Add a message when unable to save an object through api.
Diffstat (limited to 'lib/api/deploy_keys.rb')
-rw-r--r-- | lib/api/deploy_keys.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/deploy_keys.rb b/lib/api/deploy_keys.rb index 06eb7756841..dd4b761feb2 100644 --- a/lib/api/deploy_keys.rb +++ b/lib/api/deploy_keys.rb @@ -58,7 +58,7 @@ module API if key.valid? && user_project.deploy_keys << key present key, with: Entities::SSHKey else - render_validation_error!(key) + render_api_error!("Failed to add key #{key.errors.messages}", 400) end end |