Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frontend: ワードミュートの正規表現の検証に失敗したとき、エラーダイアログを表示してほしい #13799

Open
1 task
KisaragiEffective opened this issue May 6, 2024 · 1 comment
Labels
⚠️bug? This might be a bug

Comments

@KisaragiEffective
Copy link
Sponsor Contributor

💡 Summary

ワードミュートの正規表現の検証に失敗したとき、エラーダイアログを表示してほしい

🥰 Expected Behavior

エラーのダイアログが表示される

🤬 Actual Behavior

エラーのダイアログが表示されない。正常に保存されたように錯覚するが、保存されていないので巻き戻ったように感じられてストレスフル

📝 Steps to Reproduce

  1. ワードミュートの設定画面を開く
  2. /(.)\1{4} \1{7} \1{5}/を入力
  3. (validateMuteWordRegex に失敗し、ステータスコード400で失敗するが) ダイアログが表示されないことを確認する

エラーレスポンス:

{"error":{"message":"Invalid Regular Expression.","code":"INVALID_REGEXP","id":"0d786918-10df-41cd-8f33-8dec7d9a89a5","kind":"client"}}

💻 Frontend Environment

* Model and OS of the device(s): Linux 6.6.13+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.6.13-1~bpo12+1 (2024-02-15) GNU/Linux (`uname -srvo`)
* Browser: Firefox 125.0.2
* Server URL: misskey.niri.la
* Misskey: 2024.3.1-kinel.4

🛰 Backend Environment (for server admin)

N/A (not admin)

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request
@KisaragiEffective KisaragiEffective added the ⚠️bug? This might be a bug label May 6, 2024
@KisaragiEffective
Copy link
Sponsor Contributor Author

ワードミュートは単にクライアントで処理されるようになったのでbackendの処理を消してfrontendに移行しても良いかもしれない。
その場合はfrontend側でRegExpコンストラクタからSyntaxErrorが投げられたら解釈できない正規表現であることを報告するようにするべき (参考)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️bug? This might be a bug
Projects
Status: Triage
Development

No branches or pull requests

1 participant