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

(-)a/Koha/REST/Plugin/Exceptions.pm (-4 / +3 lines)
Lines 71-80 sub register { Link Here
71
            $c->app->log->error( "$message" );
71
            $c->app->log->error( "$message" );
72
72
73
            $c->render(
73
            $c->render(
74
                status  => 500,
74
                status => 500,
75
                openapi => {
75
                json   => {
76
                    error =>
76
                    error      => "Something went wrong, check Koha logs for details.",
77
                      "Something went wrong, check Koha logs for details.",
78
                    error_code => 'internal_server_error',
77
                    error_code => 'internal_server_error',
79
                }
78
                }
80
            );
79
            );
(-)a/Koha/REST/V1/Auth.pm (-9 / +2 lines)
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
- 

Return to bug 36421