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: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Tomas Cohen Arazi 2024-07-08 14:34:25 -03:00 committed by Lucas Gass
parent 1e6def260e
commit dead285545
1 changed files with 33 additions and 0 deletions

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;