Invalid enum values would previously result in a Sequel::DatabaseError (wrapping PG::InvalidTextRepresentation) when saving. This changes the behavior from an unhandled exception 500 error to a nice 400 error. We previously had manually validations in LoadBalancer for the enum values. This removes those. Only change in the tests is to an error message, and I think the new error message is nicer. In order for this to work, the Database needs to use the pg_enum plugin, so this uses that and regenerates the schema cache with it.
2.0 KiB
2.0 KiB