-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
None
A user friendly message would be more helpful than showing a long and scary looking error.
Failed query: ' INSERT INTO editor_collection_artist (collection, artist) SELECT DISTINCT add.collection, add.artist FROM (VALUES (?::integer, ?::integer)) add (collection, artist) WHERE NOT EXISTS ( SELECT TRUE FROM editor_collection_artist WHERE collection = add.collection AND artist = add.artist LIMIT 1 )' (2746390 2157755) 23503 DBD::Pg::st execute failed: ERROR: insert or update on table "editor_collection_artist" violates foreign key constraint "editor_collection_artist_fk_artist" DETAIL: Key (artist)=(2157755) is not present in table "artist". [for Statement " INSERT INTO editor_collection_artist (collection, artist) SELECT DISTINCT add.collection, add.artist FROM (VALUES (?::integer, ?::integer)) add (collection, artist) WHERE NOT EXISTS ( SELECT TRUE FROM editor_collection_artist WHERE collection = add.collection AND artist = add.artist LIMIT 1 )" with ParamValues: 1='2746390', 2='2157755'] Sql::catch {...} (MusicBrainz::Server::Exceptions::DatabaseError=HASH(0x55b834f39428)) called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 123 Try::Tiny::try(CODE(0x55b8337afe40), Try::Tiny::Catch=REF(0x55b833115720)) called at lib/Sql.pm line 117 Sql::do(Sql=HASH(0x55b8334c9bf8), "\x{a} INSERT INTO editor_collection_artist (collection, ar"..., 2746390, 2157755) called at lib/MusicBrainz/Server/Data/Collection.pm line 64 MusicBrainz::Server::Data::Collection::add_entities_to_collection(MusicBrainz::Server::Data::Collection=HASH(0x55b82acc7060), "artist", 2746390, 2157755) called at lib/MusicBrainz/Server/Controller/Collection.pm line 68 MusicBrainz::Server::Controller::Collection::_do_add_or_remove(MusicBrainz::Server::Controller::Collection=HASH(0x55b82d0ad938), MusicBrainz::Server=HASH(0x55b834f3adf8), "add_entities_to_collection") called at lib/MusicBrainz/Server/Controller/Collection.pm line 81 MusicBrainz::Server::Controller::Collection::add(MusicBrainz::Server::Controller::Collection=HASH(0x55b82d0ad938), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358 Catalyst::Action::execute(Catalyst::Action=HASH(0x55b82d291fb8), MusicBrainz::Server::Controller::Collection=HASH(0x55b82d0ad938), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2061 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2061 Catalyst::execute(MusicBrainz::Server=HASH(0x55b834f3adf8), "MusicBrainz::Server::Controller::Collection", Catalyst::Action=HASH(0x55b82d291fb8)) called at lib/Catalyst/Plugin/ErrorInfo.pm line 34 Catalyst::Plugin::ErrorInfo::execute(MusicBrainz::Server=HASH(0x55b834f3adf8), "MusicBrainz::Server::Controller::Collection", Catalyst::Action=HASH(0x55b82d291fb8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x55b82d291fb8), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/ActionChain.pm line 46 Catalyst::ActionChain::dispatch(Catalyst::ActionChain=HASH(0x55b835127f08), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Controller.pm line 170 Catalyst::Controller::_ACTION(MusicBrainz::Server::Controller::Collection=HASH(0x55b82d0ad938), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358 Catalyst::Action::execute(Catalyst::Action=HASH(0x55b82d28e790), MusicBrainz::Server::Controller::Collection=HASH(0x55b82d0ad938), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2061 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2061 Catalyst::execute(MusicBrainz::Server=HASH(0x55b834f3adf8), "MusicBrainz::Server::Controller::Collection", Catalyst::Action=HASH(0x55b82d28e790)) called at lib/Catalyst/Plugin/ErrorInfo.pm line 34 Catalyst::Plugin::ErrorInfo::execute(MusicBrainz::Server=HASH(0x55b834f3adf8), "MusicBrainz::Server::Controller::Collection", Catalyst::Action=HASH(0x55b82d28e790)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x55b82d28e790), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 261 Catalyst::Dispatcher::_do_forward(Catalyst::Dispatcher=HASH(0x55b8205cebd0), "forward", MusicBrainz::Server=HASH(0x55b834f3adf8), "_ACTION") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 241 Catalyst::Dispatcher::forward(Catalyst::Dispatcher=HASH(0x55b8205cebd0), MusicBrainz::Server=HASH(0x55b834f3adf8), "_ACTION") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 483 Catalyst::forward(MusicBrainz::Server=HASH(0x55b834f3adf8), "_ACTION") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Controller.pm line 134 Catalyst::Controller::_DISPATCH(MusicBrainz::Server::Controller::Collection=HASH(0x55b82d0ad938), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358 Catalyst::Action::execute(Catalyst::Action=HASH(0x55b82d28be08), MusicBrainz::Server::Controller::Collection=HASH(0x55b82d0ad938), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2061 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2061 Catalyst::execute(MusicBrainz::Server=HASH(0x55b834f3adf8), "MusicBrainz::Server::Controller::Collection", Catalyst::Action=HASH(0x55b82d28be08)) called at lib/Catalyst/Plugin/ErrorInfo.pm line 34 Catalyst::Plugin::ErrorInfo::execute(MusicBrainz::Server=HASH(0x55b834f3adf8), "MusicBrainz::Server::Controller::Collection", Catalyst::Action=HASH(0x55b82d28be08)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x55b82d28be08), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 261 Catalyst::Dispatcher::_do_forward(Catalyst::Dispatcher=HASH(0x55b8205cebd0), "forward", MusicBrainz::Server=HASH(0x55b834f3adf8), "/collection/_DISPATCH") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 241 Catalyst::Dispatcher::forward(Catalyst::Dispatcher=HASH(0x55b8205cebd0), MusicBrainz::Server=HASH(0x55b834f3adf8), "/collection/_DISPATCH") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 483 Catalyst::forward(MusicBrainz::Server=HASH(0x55b834f3adf8), "/collection/_DISPATCH") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 107 Catalyst::Dispatcher::dispatch(Catalyst::Dispatcher=HASH(0x55b8205cebd0), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2007 Catalyst::dispatch(MusicBrainz::Server=HASH(0x55b834f3adf8)) called at lib/MusicBrainz/Server.pm line 390 MusicBrainz::Server::__ANON__() called at lib/MusicBrainz/Server.pm line 357 MusicBrainz::Server::with_translations(MusicBrainz::Server=HASH(0x55b834f3adf8), CODE(0x55b83384fcf8)) called at lib/MusicBrainz/Server.pm line 391 Class::MOP::Class:::around(CODE(0x55b81c4114d8), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 164 Class::MOP::Method::Wrapped::__ANON__(MusicBrainz::Server=HASH(0x55b834f3adf8)) called at lib/MusicBrainz/Server.pm line 405 Class::MOP::Class:::around(CODE(0x55b82d129448), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 164 Class::MOP::Method::Wrapped::__ANON__(MusicBrainz::Server=HASH(0x55b834f3adf8)) called at lib/MusicBrainz/Server.pm line 490 Class::MOP::Class:::around(CODE(0x55b82d1292e0), MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 164 Class::MOP::Method::Wrapped::__ANON__(MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 35 MusicBrainz::Server::_wrapped_dispatch(MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 95 MusicBrainz::Server::dispatch(MusicBrainz::Server=HASH(0x55b834f3adf8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2413 Catalyst::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 102 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93 Try::Tiny::try(CODE(0x55b833547f90), Try::Tiny::Catch=REF(0x55b8334ac750)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2422 Catalyst::handle_request("MusicBrainz::Server", "env", HASH(0x55b83373d7f8), "response_cb", CODE(0x55b835339b00)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Engine.pm line 807 Catalyst::Engine::__ANON__(CODE(0x55b835339b00)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Middleware/HTTPExceptions.pm line 32 Plack::Middleware::HTTPExceptions::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 102 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93 Try::Tiny::try(CODE(0x55b83355c490), Try::Tiny::Catch=REF(0x55b8353ac9d0)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Middleware/HTTPExceptions.pm line 41 Plack::Middleware::HTTPExceptions::__ANON__(CODE(0x55b83373da38)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::__ANON__(CODE(0x55b833473f08)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::__ANON__(CODE(0x55b833927758)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::__ANON__(CODE(0x55b8338367a0)) called at /home/musicbrainz/carton-local/lib/perl5/Starlet/Server.pm line 377 Starlet::Server::handle_connection(Plack::Handler::Starlet=HASH(0x55b82d1d0c20), HASH(0x55b83373d7f8), IO::Socket::INET=GLOB(0x55b8337ec6e8), CODE(0x55b81fe66db8), "", "", "") called at /home/musicbrainz/carton-local/lib/perl5/Starlet/Server.pm line 190 Starlet::Server::accept_loop(Plack::Handler::Starlet=HASH(0x55b82d1d0c20), CODE(0x55b81fe66db8), 88) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Handler/Starlet.pm line 80 Plack::Handler::Starlet::run(Plack::Handler::Starlet=HASH(0x55b82d1d0c20), CODE(0x55b81fe66db8)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Loader.pm line 84 Plack::Loader::run(Plack::Loader=HASH(0x55b819faa1b0), Plack::Handler::Starlet=HASH(0x55b82d1d0c20)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Runner.pm line 277 Plack::Runner::run(Plack::Runner=HASH(0x55b819d07ec0)) called at /home/musicbrainz/carton-local/bin/plackup line 7 at lib/MusicBrainz/Server/Data/Collection.pm line 64 MusicBrainz::Server::Data::Collection::add_entities_to_collection(?, ?, ?, ?) called at lib/MusicBrainz/Server/Controller/Collection.pm line 68 MusicBrainz::Server::Controller::Collection::_do_add_or_remove(?, ?, ?) called at lib/MusicBrainz/Server/Controller/Collection.pm line 81 Catalyst::dispatch(?) called at lib/MusicBrainz/Server.pm line 390 MusicBrainz::Server::__ANON__ at lib/MusicBrainz/Server.pm line 357 MusicBrainz::Server::with_translations(?, ?) called at lib/MusicBrainz/Server.pm line 391 Class::MOP::Method::Wrapped::__ANON__(?) called at lib/MusicBrainz/Server.pm line 405 Class::MOP::Method::Wrapped::__ANON__(?) called at lib/MusicBrainz/Server.pm line 490