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

(-)a/Koha/REST/V1/Cities.pm (-4 / +3 lines)
Lines 42-48 sub list { Link Here
42
    catch {
42
    catch {
43
        if ( $_->isa('DBIx::Class::Exception') ) {
43
        if ( $_->isa('DBIx::Class::Exception') ) {
44
            return $c->render( status  => 500,
44
            return $c->render( status  => 500,
45
                               openapi => { error => $_->msg } );
45
                               openapi => { error => $_->{msg} } );
46
        }
46
        }
47
        else {
47
        else {
48
            return $c->render( status => 500,
48
            return $c->render( status => 500,
Lines 76-82 sub add { Link Here
76
    catch {
76
    catch {
77
        if ( $_->isa('DBIx::Class::Exception') ) {
77
        if ( $_->isa('DBIx::Class::Exception') ) {
78
            return $c->render( status  => 500,
78
            return $c->render( status  => 500,
79
                               openapi => { error => $_->message } );
79
                               openapi => { error => $_->{msg} } );
80
        }
80
        }
81
        else {
81
        else {
82
            return $c->render( status => 500,
82
            return $c->render( status => 500,
Lines 131-137 sub delete { Link Here
131
        }
131
        }
132
        elsif ( $_->isa('DBIx::Class::Exception') ) {
132
        elsif ( $_->isa('DBIx::Class::Exception') ) {
133
            return $c->render( status  => 500,
133
            return $c->render( status  => 500,
134
                               openapi => { error => $_->msg } );
134
                               openapi => { error => $_->{msg} } );
135
        }
135
        }
136
        else {
136
        else {
137
            return $c->render( status => 500,
137
            return $c->render( status => 500,
138
- 

Return to bug 18137