View | Details | Raw Unified | Return to bug 25493
Collapse All | Expand All

(-)a/Koha/REST/Plugin/Exceptions.pm (-1 / +2 lines)
Lines 69-75 sub register { Link Here
69
69
70
            my $message = "$method $path: unhandled exception $type\<\<$exception_string\>\>";
70
            my $message = "$method $path: unhandled exception $type\<\<$exception_string\>\>";
71
71
72
            $c->app->log->error("$message");
72
            my $logger = Koha::Logger->get({ interface => 'api' });
73
            $logger->error("$message");
73
74
74
            $c->render(
75
            $c->render(
75
                status  => 500,
76
                status  => 500,
(-)a/Koha/REST/V1.pm (-4 lines)
Lines 40-47 Overloaded Mojolicious->startup method. It is called at application startup. Link Here
40
sub startup {
40
sub startup {
41
    my $self = shift;
41
    my $self = shift;
42
42
43
    $self->log( Koha::Logger->get({ interface => 'api' }) );
44
45
    $self->hook(
43
    $self->hook(
46
        before_dispatch => sub {
44
        before_dispatch => sub {
47
            my $c = shift;
45
            my $c = shift;
Lines 63-69 sub startup { Link Here
63
    $self->types->type( mij     => 'application/marc-in-json' );
61
    $self->types->type( mij     => 'application/marc-in-json' );
64
    $self->types->type( marc    => 'application/marc' );
62
    $self->types->type( marc    => 'application/marc' );
65
63
66
67
    my $secret_passphrase = C4::Context->config('api_secret_passphrase');
64
    my $secret_passphrase = C4::Context->config('api_secret_passphrase');
68
    if ($secret_passphrase) {
65
    if ($secret_passphrase) {
69
        $self->secrets([$secret_passphrase]);
66
        $self->secrets([$secret_passphrase]);
70
- 

Return to bug 25493