URL ID filter, error logging, and API key redaction#12
Merged
Conversation
Collaborator
amorgan-atlas-sys
commented
May 1, 2026
- ExtractIds: apply MMS/IE prefix filter (^99 / ^[125]1) to the URL match so non-ID values in the docid parameter are rejected.
- WebClient: add GetWebExceptionMessage helper to surface HTTP error details (status + Alma's XML error body) instead of swallowing them.
- WebClient: redact the configured Alma API key from logged URLs and exception bodies; key is set via WebClient.Initialize and hidden in a module-local.
- AlmaApi: introduce Initialize(apiUrl, apiKey) as the single setup entry point; propagates the key to WebClient.Initialize.
- Add nil-guards for failed Alma responses in ConvertIeIdsToMmsIds, RetrieveItems, and RetrieveItemsList so a failed call logs and skips instead of crashing the form.
- ExtractIds: apply MMS/IE prefix filter (^99 / ^[125]1) to the URL match so non-ID values in the docid parameter are rejected. - WebClient: add GetWebExceptionMessage helper to surface HTTP error details (status + Alma's XML error body) instead of swallowing them. - WebClient: redact the configured Alma API key from logged URLs and exception bodies; key is set via WebClient.Initialize and hidden in a module-local. - AlmaApi: introduce Initialize(apiUrl, apiKey) as the single setup entry point; propagates the key to WebClient.Initialize. - Add nil-guards for failed Alma responses in ConvertIeIdsToMmsIds, RetrieveItems, and RetrieveItemsList so a failed call logs and skips instead of crashing the form.
…ion, expand changelog - WebClient: include response body in the message returned by GetWebExceptionMessage so Alma's XML error payload surfaces at Error level (previously only logged at Debug). Drop the now-redundant Debug log. Comment the luanet "Response" string-name quirk so future maintainers don't read it as dead code. - AlmaApi: log mid-pagination failures at Error with partial-vs-total counts. Returning the accumulated xmlResult is intentional (degrade rather than crash), but it leaves total_record_count overstated, so the truncation now shows up clearly in logs. Offset 0 stays Warn. - README: expand 2.0.1 notes to cover API-key redaction and improved HTTP error logging alongside the URL ID filter.
mcalsada
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.