Skip to content

Commit

Permalink
Merge pull request #250 from LD4P/alma-error-logging
Browse files Browse the repository at this point in the history
Adds more logging to troubleshoot Alma errors
  • Loading branch information
jermnelson authored Jan 9, 2025
2 parents 64a3fd6 + a6d1601 commit 28bcf17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions ils_middleware/tasks/alma/post_bfinstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ def NewInstancetoAlma(**kwargs):
put_mms_id_str,
)
else:
raise Exception(f"Unexpected status code from Alma API: {status}")
raise Exception(
f"Unexpected status code from Alma API: {status}, Error detail {result}"
)


def putInstanceToAlma(
Expand Down Expand Up @@ -117,5 +119,5 @@ def putInstanceToAlma(
raise Exception(f"Internal server error from Alma API: {put_update_status}")
case _:
raise Exception(
f"Unexpected status code from Alma API: {put_update_status}"
f"Unexpected status code from Alma API: {put_update_status}, Error detail: {put_update.text}"
)
6 changes: 4 additions & 2 deletions ils_middleware/tasks/alma/post_bfwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ def NewWorktoAlma(**kwargs):
put_mms_id_str,
)
else:
raise Exception(f"Unexpected status code from Alma API: {status}")
raise Exception(
f"Unexpected status code from Alma API: {status} Error detail: {result}"
)


def putWorkToAlma(
Expand Down Expand Up @@ -118,5 +120,5 @@ def putWorkToAlma(
raise Exception(f"Internal server error from Alma API: {put_update_status}")
case _:
raise Exception(
f"Unexpected status code from Alma API: {put_update_status}"
f"Unexpected status code from Alma API: {put_update_status}. Error detail: {put_update.text}"
)

0 comments on commit 28bcf17

Please sign in to comment.