Lines 95-104
sub under {
Link Here
|
95 |
|
95 |
|
96 |
} catch { |
96 |
} catch { |
97 |
unless (blessed($_)) { |
97 |
unless (blessed($_)) { |
98 |
return $c->render( |
98 |
$c->unhandled_exception($_); |
99 |
status => 500, |
|
|
100 |
json => { error => 'Something went wrong, check the logs.' } |
101 |
); |
102 |
} |
99 |
} |
103 |
if ($_->isa('Koha::Exceptions::UnderMaintenance')) { |
100 |
if ($_->isa('Koha::Exceptions::UnderMaintenance')) { |
104 |
return $c->render(status => 503, json => { error => $_->error }); |
101 |
return $c->render(status => 503, json => { error => $_->error }); |
Lines 128-137
sub under {
Link Here
|
128 |
return $c->render(status => 500, json => { error => $_->error }); |
125 |
return $c->render(status => 500, json => { error => $_->error }); |
129 |
} |
126 |
} |
130 |
else { |
127 |
else { |
131 |
return $c->render( |
128 |
$c->unhandled_exception($_); |
132 |
status => 500, |
|
|
133 |
json => { error => 'Something went wrong, check the logs.' } |
134 |
); |
135 |
} |
129 |
} |
136 |
}; |
130 |
}; |
137 |
|
131 |
|
138 |
- |
|
|