diff options
-rw-r--r-- | app/controllers/api_controller.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index a5b70b8d2..a152813f0 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -46,12 +46,8 @@ class ApiController < ApplicationController request.outgoing_messages << outgoing_message # Return an error if the request is invalid + # (Can this ever happen?) if !request.valid? - # We don't want the error "Outgoing messages is invalid", as in this - # case the list of errors will also contain a more specific error - # describing the reason it is invalid. - info_request.errors.delete("outgoing_messages") - render :json => { 'errors' => request.errors.full_messages } |