import: Catch errors in get_single and sanity_check

This commit is contained in:
Birte Kristina Friesel 2024-10-23 20:08:01 +02:00
parent 3e2e9cf71d
commit 481c49a3c2
No known key found for this signature in database
GPG key ID: B63118F7196EA660

View file

@ -571,14 +571,20 @@ sub import_v1 {
my $journey; my $journey;
if ( not $error ) { if ( not $error ) {
$journey = $self->journeys->get_single( eval {
uid => $uid, $journey = $self->journeys->get_single(
db => $db, uid => $uid,
journey_id => $journey_id, db => $db,
verbose => 1 journey_id => $journey_id,
); verbose => 1
$error );
= $self->journeys->sanity_check( $journey, $payload->{lax} ? 1 : 0 ); $error
= $self->journeys->sanity_check( $journey,
$payload->{lax} ? 1 : 0 );
};
if ($@) {
$error = $@;
}
} }
if ($error) { if ($error) {