From a5c9085821ad057f12c51975b7675bc6d4c9cee1 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart Signed-off-by: wainuiwitikapark (cherry picked from commit 8c63713497d86ac985734d18ea0acd86a4d45abf) Signed-off-by: Frédéric Demians --- 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 0000000000..bbcd0fed6b --- /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.39.5