Invalid attachment data on server error when getting doc with attachments
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js
- 領域
- database
調査の方向性
nginx と CouchDB のセットアップで gist の再現を実行し、次に packages/node_modules/pouchdb-core/src/adapter.js の 665 行目を調べます。そこでは attachment リクエストのエラーが処理されていません。失敗した attachment リクエストによって、サーバーのエラーレスポンスを attachment データとして保存するのではなく、ドキュメントリクエストがエラーをスローするようになれば、issue は完了です。
索引モデルが issue の本文から書いたものです。
説明
Issue
When requesting a doc with attachments, if an attachment request fails, the doc attachment data will save the error message, instead of failing the request, resulting in invalid attachments.
This can happen during replication, bulkGet, etc.
Info
- Environment: node.js, browser
- Adapter: http (?)
- Server: CouchDb
Reproduce
Here's the gist: https://gist.github.com/dianabarsan/c08f5fc114c221a99d2afad7c870bf76
It adds a minimal nginx config that responds with a 400 to an attachment request, and proxies all other requests to a vanilla CouchDb 3.4.2, using docker compose.
Has a Javascript file that:
- creates a database
- creates a doc with a plain text attachment
- initializes a PouchDb connection and does a
db.getand logs the content of the attachment, which is the default nginx html error page for 400.
Desired behavior here would be to throw an error when the attachment get request responds with an error.
Faulty code is here:
https://github.com/pouchdb/pouchdb/blob/master/packages/node_modules/pouchdb-core/src/adapter.js#L665 where the potential error is not handled.
- 主要言語
- JavaScript
- スター
- 17.6k
- フォーク
- 1.5k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/pouchdb のほかの issue
-
elemMatch throws TypeError: value is null if array has null element対応中かも @henyanagar が 143 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
help wanted Idea 💡 wdio-cli
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
webdriverio/webdriverio#16361 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
clientV2: Application Info header separators show as missing-character boxes without a CJK fontオープンbug new-client
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
NUWCDIVNPT/stig-manager#2285 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Fei2411/DeepSeek-Bot#922 · リアクション 1 件 ·
-
Workers AI integration drops output of non-streaming chat responses in the OpenAI format (`choices`)オープンBug Cloudflare Workers Spans
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-javascript#26120 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信