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: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
This commit is contained in:
Tomás Cohen Arazi 2024-07-08 14:34:25 -03:00 committed by wainuiwitikapark
parent f4cab95872
commit 8c63713497

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;