Skip to content

Conversation

@stuartcampbell
Copy link
Collaborator

@stuartcampbell stuartcampbell commented Apr 18, 2025

Add some error handling for when the underlying database does not contain the cycle details for a facility - this usually happens when the synchronization is not working.

There was also a bug in the code that wasn't actually getting the list of cycles for lbms facility but getting them for nsls2 instead.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request enhances error handling when cycle details are missing by wrapping proposal retrieval in try/except blocks and incorporating logging for both NSLS-II and LBMS facilities.

  • Added try/except blocks around proposal fetching for NSLS-II and LBMS cycles.
  • Introduced logging of LookupError conditions to report missing cycle details.
  • Passed facility_name to the LBMS proposal fetch function call for targeted error handling.

@stuartcampbell stuartcampbell added the bug Something isn't working label Apr 18, 2025
@stuartcampbell stuartcampbell self-assigned this Apr 18, 2025
Copy link
Collaborator

@padraic-shafer padraic-shafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@stuartcampbell stuartcampbell merged commit 3e2e970 into NSLS2:main Apr 18, 2025
4 checks passed
@stuartcampbell stuartcampbell deleted the fix-stats-endpoint branch April 18, 2025 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants