delete $opts->{scope} unless $opts->{scope};
delete $opts->{annotation} unless $opts->{annotation};
+ delete $opts->{is_significant} unless $opts->{is_significant};
$opts->{propagate} = 1;
try {
$m->save( $tradition );
} catch( Text::Tradition::Error $e ) {
$c->response->status( '403' );
- $c->stash->{'result'} = { 'error' => $e->message };
+ $c->stash->{'result'} = { error => $e->message };
+ } catch {
+ $c->response->status( '500' );
+ $c->stash->{'result'} = { error => "Something went wrong with the request" };
}
} elsif( $c->request->method eq 'DELETE' ) {
my $node = $c->request->param('source_id');
} catch( Text::Tradition::Error $e ) {
$c->response->status( '403' );
$c->stash->{'result'} = { 'error' => $e->message };
- }
+ } catch {
+ $c->response->status( '500' );
+ $c->stash->{'result'} = { error => "Something went wrong with the request" };
+ }
}
}
$c->forward('View::JSON');
$errmsg = $e->message;
} catch {
# Something else went wrong, probably a Moose error
- $c->response->status( '403' );
+ $c->response->status( '500' );
$errmsg = 'Something went wrong with the request';
}
}
$errmsg = $e->message;
} catch {
# Something else went wrong, probably a Moose error
- $c->response->status( '403' );
+ $c->response->status( '500' );
$errmsg = 'Something went wrong with the request';
}
if( $newrdg ) {