When trying to set a
Custom incoming email address to a category, I’ve got this error:
Sorry, an error has occurred.
I could then easily see on the log why that happens. I suppose we can only use one incoming email per category:
ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_categories_on_email_in"
DETAIL: Key (email_in)=(firstname.lastname@example.org) already exists.
: UPDATE “categories” SET “email_in” = $1, “updated_at” = $2 WHERE “categories”.“id” = 15)
I just thought I would report this as I believe the first error message could probably be easily improved. Specially nice if it could say which category already had the email!