D-12493: catch exception thrown when unique constraint is violated and return 409