Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Isolate pass service errors & potentially log and discard invalid proposal info

オープン
#71 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

@stuartcampbell がすでに取り組んでいます。

2024年5月11日 から。

評価

この issue はまだ評価されていません。

説明

Consider breaking up the try-catch blocks here (and similar uses elsewhere) to:

  1. Isolate the source of an error
  2. Possibly log and then discard invalid proposal types

https://github.com/NSLS2/nsls2api/blob/a2de1f81dbc5b9cef843826e3c7b917ba77d6f58/src/nsls2api/services/pass_service.py#L75-L88

For example:

 try: 
     pass_proposal_types_list = await _call_pass_webservice(url) 
 except Exception as error: 
     error_message = "Error retrieving proposal types from PASS." 
     logger.exception(error_message) 
     raise PassException(error_message) from error 

proposal_types = [] 
if pass_proposal_types_list and len(pass_proposal_types_list) > 0: 
    for proposal_type in pass_proposal_types_list: 
        try: 
            proposal_types.append(PassProposalType(**proposal_type)) 
        except ValidationError as error: 
            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 
主要言語
Python
スター
0
フォーク
13
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NSLS2/nsls2api のほかの issue

NSLS2/nsls2api の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。