Skip to content

Commit

Permalink
remove param and add logger for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mlennie committed Sep 22, 2017
1 parent 484db4c commit a750efd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/omnicontacts/middleware/base_oauth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,13 @@ def execute_and_rescue_exceptions

def handle_error error_type, exception
logger.puts("Error #{error_type} while processing #{@env["PATH_INFO"]}: #{exception.message}") if logger
Rails.logger.info("*********************************************** ERROR ***********************************************************")
Rails.logger.error("*********************************************** ERROR ***********************************************************")
Rails.logger.info(exception)
Rails.logger.error(exception)
puts("*********************************************** ERROR ***********************************************************")
puts(exception)
failure_url = "#{ MOUNT_PATH }failure?error_message=#{error_type}&importer=#{class_name}&error=#{exception.message.to_s}"
failure_url = "#{ MOUNT_PATH }failure?error_message=#{error_type}&importer=#{class_name}"
params_url = append_request_params(failure_url)
target_url = append_state_query(params_url)
[302, {"Content-Type" => "text/html", "location" => target_url}, []]
Expand Down

0 comments on commit a750efd

Please sign in to comment.