aboutsummaryrefslogtreecommitdiffstats
path: root/app/errors
diff options
context:
space:
mode:
authorTeddy Wing2017-12-12 16:56:49 +0100
committerTeddy Wing2017-12-12 16:56:49 +0100
commit55b995531b2504792dfa1b0314b5cc5b55a775ac (patch)
treefe3f43a490e28fa3064541292eea6180692b31c3 /app/errors
parentc84154201959197a99de202d97baff1c812dead9 (diff)
downloadchouette-core-55b995531b2504792dfa1b0314b5cc5b55a775ac.tar.bz2
Referential: Raise an error if the table lock times out
Paired with Johan on this one. There's an internal timeout on our table lock. If it's reached, an `ActiveRecord::StatementInvalid<PG::LockNotAvailable>` error is raised. Use a custom error instead by "overriding" `#save` with a method that raises our custom error in that case instead. This will enable us to provide a custom user-facing error in the event this happens. Refs #5024
Diffstat (limited to 'app/errors')
-rw-r--r--app/errors/table_lock_timeout_error.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/errors/table_lock_timeout_error.rb b/app/errors/table_lock_timeout_error.rb
new file mode 100644
index 000000000..102f3a4a0
--- /dev/null
+++ b/app/errors/table_lock_timeout_error.rb
@@ -0,0 +1 @@
+class TableLockTimeoutError < ActiveRecord::StatementInvalid; end