From 6aa80b2d41a2f1fa6331db0cb3e85f043e2cf274 Mon Sep 17 00:00:00 2001 From: Deepika Gonuguntla Date: Wed, 5 Feb 2025 14:31:45 -0500 Subject: [PATCH] Added for testing --- app/controllers/api/v01/bibs_controller.rb | 4 ++-- app/controllers/api/v01/items_controller.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/v01/bibs_controller.rb b/app/controllers/api/v01/bibs_controller.rb index 4134f8e7..6d467186 100644 --- a/app/controllers/api/v01/bibs_controller.rb +++ b/app/controllers/api/v01/bibs_controller.rb @@ -31,7 +31,7 @@ def create_or_update_teacher_sets message = e.message response = SYS_FAILURE.call(e.code, e.message, e.detailed_msg, "Bib id: #{req_body["id"]}") rescue SuppressedBibRecordException, BibRecordNotFoundException => e - http_status = 404 + http_status = 500 #this is for testing message = e.message response = SYS_FAILURE.call(e.code, e.message, e.detailed_msg, "Bib id: #{req_body["id"]}") rescue DBException, ElasticsearchException => e @@ -81,7 +81,7 @@ def delete_teacher_sets message = e.message response = SYS_FAILURE.call(e.code, message, e.detailed_msg, "Bib id: #{req_body["id"]}") rescue BibRecordNotFoundException => e - http_status = 404 + http_status = 500 #this is for testing message = e.message response = SYS_FAILURE.call(e.code, message, e.detailed_msg, "Bib id: #{req_body["id"]}") rescue DBException, ElasticsearchException => e diff --git a/app/controllers/api/v01/items_controller.rb b/app/controllers/api/v01/items_controller.rb index 30f65542..ed21990a 100644 --- a/app/controllers/api/v01/items_controller.rb +++ b/app/controllers/api/v01/items_controller.rb @@ -46,7 +46,7 @@ def update_availability teacher_set = TeacherSet.find_by_bnumber("b#{t_set_bnumber}") unless teacher_set.present? - http_status = 404 + http_status = 500 #this is for testing message = "BIB id not found in MLN DB. Bib id b#{t_set_bnumber}," http_response = SYS_FAILURE.call(http_status, message, "Item id: #{req_body["id"]}") end