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:
parent
470db1620f
commit
5b75ae509d
1 changed files with 33 additions and 0 deletions
33
Koha/Exceptions/REST.pm
Normal file
33
Koha/Exceptions/REST.pm
Normal 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;
|
Loading…
Reference in a new issue