From 3f7b9d3a94efe5949346e99fa4fec276c7d08396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Tue, 22 Oct 2019 12:48:17 +0000 Subject: [PATCH] Bug 18795: (follow-up) Unify error message to be same across codebase In Koha/REST/V1/Patrons.pm the error message for not finding patron is "Patron not found" so let's use the same here. Signed-off-by: Bouzid Fergani --- Koha/REST/V1/Checkouts.pm | 2 +- t/db_dependent/api/v1/checkouts.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/REST/V1/Checkouts.pm b/Koha/REST/V1/Checkouts.pm index 17614a6..84ed56d 100644 --- a/Koha/REST/V1/Checkouts.pm +++ b/Koha/REST/V1/Checkouts.pm @@ -199,7 +199,7 @@ sub delete_history { unless ($patrons->count) { return $c->render( status => 404, openapi => { - error => "Patron doesn't exist" + error => "Patron not found" }); } diff --git a/t/db_dependent/api/v1/checkouts.t b/t/db_dependent/api/v1/checkouts.t index a1df3a6..77cb313 100644 --- a/t/db_dependent/api/v1/checkouts.t +++ b/t/db_dependent/api/v1/checkouts.t @@ -232,4 +232,4 @@ $patron_to_delete->delete; $t->delete_ok( "//$userid:$password@/api/v1/checkouts/history?patron_id=$patron_to_delete_id") ->status_is(404) - ->json_is({error => "Patron doesn't exist"}); + ->json_is({error => "Patron not found"}); -- 2.7.4