Bug 27593: Consistent behavior for club holds route
This patch: - Fixes a malformed response when biblio_id is invalid - Fixes the return status (400 => 404) when biblio_id is invalid - Adapts the error strings to be consistent with the Cities.pm file To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/clubs_holds.t => FAIL: Tests fail 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
024a32ca80
commit
2387ac731c
|
|
@ -81,7 +81,7 @@ sub add {
|
|||
unless ($item) {
|
||||
return $c->render(
|
||||
status => 404,
|
||||
openapi => { error => "item_id not found." }
|
||||
openapi => { error => "Item not found" }
|
||||
);
|
||||
}
|
||||
else {
|
||||
|
|
@ -100,8 +100,8 @@ sub add {
|
|||
|
||||
unless ($biblio) {
|
||||
return $c->render(
|
||||
status => 400,
|
||||
openapi => "Biblio not found."
|
||||
status => 404,
|
||||
openapi => { error => "Biblio not found" }
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue