} catch {
warn "Caught exception";
my $exception = $_;
if ( ref($error) eq 'Koha::Exceptions::Metadata::Invalid' ) {
if ( ref($exception) eq 'Koha::Exceptions::Metadata::Invalid' ) {
warn "Found invalid metadata";
$template->param( INVALID_METADATA => $exception );
} else {
-