-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
None
We should validate that we only try to get artist credits by ids if the ids are valid, like we do with core entities.
Sentry Issue: MUSICBRAINZ-SERVER-1B
None: DBD::Pg::st execute failed: ERROR: invalid input syntax for type integer: "lol" LINE 6: WHERE artist_credit IN ('lol') ^ [for Statement "SELECT artist, artist_credit_name.name AS ac_name, join_phrase, artist_credit, artist.id, artist.gid, artist.name, artist.sort_name, artist.type, artist.area, artist.begin_area, artist.end_area, gender, artist.edits_pending, artist.comment, artist.last_updated, artist.begin_date_year, artist.begin_date_month, artist.begin_date_day, artist.end_date_year, artist.end_date_month, artist.end_date_day,artist.ended, ac.edits_pending AS ac_edits_pending FROM artist_credit_name JOIN artist ON artist.id=artist_credit_name.artist JOIN artist_credit ac ON ac.id = artist_credit_name.artist_credit WHERE artist_credit IN (?) ORDER BY artist_credit, position" with ParamValues: 1='lol'] File "Connector.pm", line 50, in Sql::select_list_of_hashes $exception->throw( sqlstate => $state, message => decode_utf8($msg) ); File "ArtistCredit.pm", line 36, in MusicBrainz::Server::Data::ArtistCredit::get_by_ids for my $row (@{ $self->sql->select_list_of_hashes($query, @ids) }) { File "EntityCache.pm", line 42, in MusicBrainz::Server::Data::ArtistCredit::get_by_ids my $data = $self->$orig(keys %ids) || {}; File "Entity.pm", line 47, in MusicBrainz::Server::Data::Entity::get_by_id my @result = values %{$self->get_by_ids($id)}; File "ArtistCredit.pm", line 25, in MusicBrainz::Server::Controller::ArtistCredit::_load my $artist_credit = $c->model('ArtistCredit')->get_by_id($id); ... (6 additional frame(s) were not displayed)