|
Lines 109-116
sub startup {
Link Here
|
| 109 |
# to catch bad ones. |
109 |
# to catch bad ones. |
| 110 |
|
110 |
|
| 111 |
# JSON::Validator uses confess, so trim call stack from the message. |
111 |
# JSON::Validator uses confess, so trim call stack from the message. |
| 112 |
my $logger = Koha::Logger->get({ interface => 'api' }); |
112 |
$self->app->log->error("Warning: Could not load REST API spec bundle: " . $_); |
| 113 |
$logger->error("Warning: Could not load REST API spec bundle: " . $_); |
|
|
| 114 |
|
113 |
|
| 115 |
try { |
114 |
try { |
| 116 |
|
115 |
|
|
Lines 135-141
sub startup {
Link Here
|
| 135 |
} |
134 |
} |
| 136 |
catch { |
135 |
catch { |
| 137 |
# JSON::Validator uses confess, so trim call stack from the message. |
136 |
# JSON::Validator uses confess, so trim call stack from the message. |
| 138 |
$logger->error("Warning: Could not load REST API spec bundle: " . $_); |
137 |
$self->app->log->error("Warning: Could not load REST API spec bundle: " . $_); |
| 139 |
}; |
138 |
}; |
| 140 |
}; |
139 |
}; |
| 141 |
|
140 |
|
|
Lines 148-155
sub startup {
Link Here
|
| 148 |
$oauth_configuration->{ $provider->code } = decode_json( $provider->config ); |
147 |
$oauth_configuration->{ $provider->code } = decode_json( $provider->config ); |
| 149 |
} |
148 |
} |
| 150 |
} catch { |
149 |
} catch { |
| 151 |
my $logger = Koha::Logger->get( { interface => 'api' } ); |
150 |
$self->app->log->warn( "Warning: Failed to fetch oauth configuration: " . $_ ); |
| 152 |
$logger->warn( "Warning: Failed to fetch oauth configuration: " . $_ ); |
|
|
| 153 |
}; |
151 |
}; |
| 154 |
|
152 |
|
| 155 |
$self->plugin( 'Koha::REST::Plugin::Pagination' ); |
153 |
$self->plugin( 'Koha::REST::Plugin::Pagination' ); |