Commit 31ef4390c8dbb488452629ee14c8e7c681edd4b8
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'api' into production
* api: Refactor of render_api_errros!
Showing
1 changed file
with
1 additions
and
5 deletions
Show diff stats
lib/noosfero/api/helpers.rb
| ... | ... | @@ -270,11 +270,7 @@ require 'grape' |
| 270 | 270 | log_msg = "#{log_message}, #{log_msg}" if log_message.present? |
| 271 | 271 | log_msg = "#{log_msg}, Javascript Console Message: #{javascript_console_message}" if javascript_console_message.present? |
| 272 | 272 | logger.error log_msg unless Rails.env.test? |
| 273 | - if javascript_console_message.present? | |
| 274 | - error!(message_hash, status) | |
| 275 | - else | |
| 276 | - error!({'message' => user_message, :code => status}, status) | |
| 277 | - end | |
| 273 | + error!(message_hash, status) | |
| 278 | 274 | end |
| 279 | 275 | |
| 280 | 276 | def render_api_errors!(messages) | ... | ... |