import: Catch errors in get_single and sanity_check
This commit is contained in:
parent
3e2e9cf71d
commit
481c49a3c2
1 changed files with 14 additions and 8 deletions
|
@ -571,6 +571,7 @@ sub import_v1 {
|
||||||
my $journey;
|
my $journey;
|
||||||
|
|
||||||
if ( not $error ) {
|
if ( not $error ) {
|
||||||
|
eval {
|
||||||
$journey = $self->journeys->get_single(
|
$journey = $self->journeys->get_single(
|
||||||
uid => $uid,
|
uid => $uid,
|
||||||
db => $db,
|
db => $db,
|
||||||
|
@ -578,7 +579,12 @@ sub import_v1 {
|
||||||
verbose => 1
|
verbose => 1
|
||||||
);
|
);
|
||||||
$error
|
$error
|
||||||
= $self->journeys->sanity_check( $journey, $payload->{lax} ? 1 : 0 );
|
= $self->journeys->sanity_check( $journey,
|
||||||
|
$payload->{lax} ? 1 : 0 );
|
||||||
|
};
|
||||||
|
if ($@) {
|
||||||
|
$error = $@;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($error) {
|
if ($error) {
|
||||||
|
|
Loading…
Reference in a new issue