Bug 37018: Add Koha::Exceptions::REST

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Tomás Cohen Arazi 2024-07-08 14:34:25 -03:00 committed by Katrin Fischer
parent 470db1620f
commit 5b75ae509d
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

33
Koha/Exceptions/REST.pm Normal file
View file

@ -0,0 +1,33 @@
package Koha::Exceptions::REST;
use Modern::Perl;
use Koha::Exception;
use Exception::Class (
'Koha::Exceptions::REST' => {
isa => 'Koha::Exception',
},
'Koha::Exceptions::REST::Query::InvalidOperator' => {
description => "Invalid operator found in query",
fields => ['operator']
},
);
=head1 NAME
Koha::Exceptions::REST - Base class for REST API exceptions
=head1 Exceptions
=head2 Koha::Exceptions::REST
Generic REST API exception.
=head2 Koha::Exceptions::REST::Query::InvalidOperator
The passed query is not allowed.
=cut
1;