coder / coder/backstage-plugins

Coder plugin: clean up error-handling logic

オープン
#134 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug good first issue
主要言語
TypeScript
スター
67
フォーク
9
PR マージ指標
30日以内にマージされた PR はありません

説明

The Coder plugin has some vestigial code from before we started using Axios. Now that we have Axios's `AxiosError`, there's far less of a need for the custom `BackstageHttpError`

In addition, the logic for spying on potentially-expired Coder session tokens can be cleaned up. The current code works, but when a Coder query fails, the plugin will make an entirely brand new request to revalidate the auth state. But if the error has a 401 status, we don't need to do that – we know that the session token is likely invalid, so we can mutate the query cache directly.

Tried to get these fixed really quickly in #132, but it started making the tests fail, so I decided to split this off into a separate issue.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、CoderプラグインのカスタムBackstageHttpError処理と、期限切れの可能性があるセッショントークンを確認するロジックを見つけます。#132で失敗したテストを確認し、続いてAxiosErrorの処理と401のクエリキャッシュパスが追加のリクエストなしで意図したとおりに動作することを検証します。完了の条件は、クリーンアップが成功するテストでカバーされていることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
authentication, developer-experience
issue の種類
リファクタリング
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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