From 0f70d57314064e3bf640eb342bec90e32fa8af43 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 8 Jul 2024 14:34:25 -0300 Subject: [PATCH] Bug 37018: Add Koha::Exceptions::REST Signed-off-by: Tomas Cohen Arazi --- Koha/Exceptions/REST.pm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Koha/Exceptions/REST.pm diff --git a/Koha/Exceptions/REST.pm b/Koha/Exceptions/REST.pm new file mode 100644 index 00000000000..bbcd0fed6bd --- /dev/null +++ b/Koha/Exceptions/REST.pm @@ -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; -- 2.45.2