saveProject throws an error when a network request fails
メンテナーはふだん 4 日以内に返信
@dyk1454683243-sudo がすでに取り組んでいます。
2026年10月2日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
調査の方向性
saveProject() のエントリポイントと、issue に示されている apiClient.put() の catch ハンドラーから始めます。HTTP レスポンスなしでリクエストが失敗するようにして障害を再現し、その後、既存の保存失敗処理が未処理の rejection や二次的な TypeError を発生させずに実行されることを確認します。
索引モデルが issue の本文から書いたものです。
説明
p5.js version
2.3.2
What is your operating system?
Linux
Web browser and version
firefox 153.0.1
Actual Behavior
When saving a project, if the request fails because of a network error, saveProject() throws a TypeError instead of handling the save failure normally.
the error is:
Cannot read properties of undefined (reading 'status')
this happens because the error handler assumes error.response always exists, but for network errors there is no response.
Expected Behavior
A network error while saving should be handled as a normal save failure without throwing another error.
The user should get the usual save failure handling instead of an unhandled/rejected promise.
Steps to reproduce
Steps:
- open an existing saved project and make some changes.
- disconnect the network or otherwise make the api request fail without returning an http response.
- try to save the project.
- saveProject() rejects with:
Cannot read properties of undefined (reading 'status')
Snippet:
apiClient
.put(`/projects/${state.project.id}`, formParams)
.catch((error) => {
const { response } = error;
if (response.status === 403) {
// ...
}
});
for a network error, error.response is undefined, so accessing response.status throws.
a possible fix would be to check whether response exists before accessing response.status, and handle network errors as a normal save failure.
- 主要言語
- JavaScript
- スター
- 1.7k
- フォーク
- 1.7k
- 平均マージ
- 6日 22時間
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
processing/p5.js-web-editor のほかの issue
-
Unable to rename sound files対応中かも @prithq が 3 日前に担当しました。 オープンAwaiting Maintainer Approval Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
processing/p5.js-web-editor#4392 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
-
Renaming a folder doubles the folder name in file paths (console errors show /lib/lib/helper.js)オープンAwaiting Maintainer Approval Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
processing/p5.js-web-editor#4365 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
p5 logo is broken on verification emails対応中かも @sourabh65mehta が 19 日前に担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
processing/p5.js-web-editor#4364 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 4 日以内に返信
-
`PATCH /editor/project/visibility` returns 200 with `null` and doesn't update when `projectId` is a slug再び着手できるかも @Prbhtsgh が 26 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンAwaiting Maintainer Approval Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
processing/p5.js-web-editor#4348 · コメント 3 件 ·
メンテナーはふだん 4 日以内に返信
-
Fix: example.js stores defaultHTML function reference instead of calling it, causing examples to display raw JavaScript source in preview対応中かも @syedbarkath980 が 4 日前に担当しました。 オープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
processing/p5.js-web-editor#4344 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 4 日以内に返信
processing/p5.js-web-editor の issue をすべて見る
似ている issue
-
0. Needs triage 35-feedback bug
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
A-linter
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
oxc-project/oxc#28783 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
osmlab/name-suggestion-index#13056 ·
メンテナーはふだん 2 日以内に返信
-
agentic-workflows
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
githubnext/gh-cao#20168 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Sagargupta16/awesome-mcp-servers#297 ·
メンテナーはふだん 1 日以内に返信