You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error_message=f"Error validating data recevied from PASS for proposal type for the {facility} facility."
logger.error(error_message)
raisePassException(error_message) fromerror
exceptExceptionaserror:
error_message="Error retrieving proposal types from PASS."
logger.exception(error_message)
raisePassException(error_message) fromerror
For example:
try:
pass_proposal_types_list=await_call_pass_webservice(url)
exceptExceptionaserror:
error_message="Error retrieving proposal types from PASS."logger.exception(error_message)
raisePassException(error_message) fromerrorproposal_types= []
ifpass_proposal_types_listandlen(pass_proposal_types_list) >0:
forproposal_typeinpass_proposal_types_list:
try:
proposal_types.append(PassProposalType(**proposal_type))
exceptValidationErroraserror:
error_message=f"Error validating data recevied from PASS for proposal type for the {facility} facility."logger.error(error_message)
# raise PassException(error_message) from error
The text was updated successfully, but these errors were encountered:
Consider breaking up the try-catch blocks here (and similar uses elsewhere) to:
nsls2api/src/nsls2api/services/pass_service.py
Lines 75 to 88 in a2de1f8
For example:
The text was updated successfully, but these errors were encountered: