From 55b995531b2504792dfa1b0314b5cc5b55a775ac Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 12 Dec 2017 16:56:49 +0100 Subject: 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` 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 --- app/errors/table_lock_timeout_error.rb | 1 + 1 file changed, 1 insertion(+) create mode 100644 app/errors/table_lock_timeout_error.rb (limited to 'app/errors') 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 -- cgit v1.2.3