Skip to content

Commit

Permalink
Merge pull request #1509 from NYPL/item-api-changes
Browse files Browse the repository at this point in the history
Added for testing
  • Loading branch information
gonuguntla authored Feb 5, 2025
2 parents 5fd4c4b + 633a2cd commit c55780c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/controllers/api/v01/bibs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v01/items_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c55780c

Please sign in to comment.