summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-12-13 11:16:11 +0100
committerAzul <azul@leap.se>2013-12-13 13:17:56 +0100
commit72087656e5092fd744f4314c9a0e91825399fefc (patch)
tree2028ea1c0aaf34d57834d39d44a4ffd314fb1a16 /core
parentce99e9892dc5f807e072be8161c19f4969b1dace (diff)
proceed even if the couch is unreachable
* in case the user has a session id, keep it but proceed without a session * in case we can't initialize the models proceed * if APP_CONFIG[:reraise_errors] is set we'll crash instead in the latter case default to reraise errors in dev and test environments.
Diffstat (limited to 'core')
-rw-r--r--core/leap_web_core.gemspec2
-rw-r--r--core/lib/extensions/couchrest.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/leap_web_core.gemspec b/core/leap_web_core.gemspec
index 05874b2..7ca4d90 100644
--- a/core/leap_web_core.gemspec
+++ b/core/leap_web_core.gemspec
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
s.add_dependency "couchrest", "~> 1.1.3"
s.add_dependency "couchrest_model", "~> 2.0.0"
- s.add_dependency "couchrest_session_store", "~> 0.2.3"
+ s.add_dependency "couchrest_session_store", "~> 0.2.4"
s.add_dependency "json"
end
diff --git a/core/lib/extensions/couchrest.rb b/core/lib/extensions/couchrest.rb
index 7450f59..9f27c3a 100644
--- a/core/lib/extensions/couchrest.rb
+++ b/core/lib/extensions/couchrest.rb
@@ -34,7 +34,7 @@ module CouchRest
Errno::ECONNREFUSED => e
message = "Could not connect to couch database #{db} due to #{e.to_s}"
Rails.logger.warn message
- raise e.class.new(message)
+ raise e.class.new(message) if APP_CONFIG[:reraise_errors]
end
end