From dead2855454618086761430ac41113c5d9816e15 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 Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart Signed-off-by: Lucas Gass --- 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