I am using this apartment a ruby gem.
I have add this in application.rb file:
config.middleware.use 'Apartment::Elevators::Subdomain'
When i try hit this in browser url 'test.domain.local:3000' where sub domain 'test' schema does not exist in PostgreSQL, i see this error
Apartment::SchemaNotFound (One of the following schema(s) is invalid: test, "public")
I know this is normal behavior of gem but want to catch this exception and redirect user to some other page, how can i do that?
Apartment::DatabaseNotFound, Apartment::SchemaNotFound
can be replaced withApartment::TenantNotFound
. Those other exceptions are deprecated. – Crinkly