taskAnswerのidの重複を避ける
Summary / 概要
- #321 にて、fabbricaを使わずに実装するためにidをハッシュで作成したが、衝突の回避を行なっていないので、稀に重複する可能性がありそう。
Steps to reproduce / 再現方法
- xxx
- yyy
- zzz
environments
-
Desktop (please complete the following information):
OS: [e.g. Mac, Windows11, Linux] Browser [e.g. Chrome, Safari, Edge, Firefox] Version [e.g. 117.0.05938.44]
-
Smartphone (please complete the following information):
Device: [e.g. iPhone15, Android13] OS: [e.g. iOS16.5, Android 13] Browser [e.g. Chrome, Safari] Version [e.g. 16.5]
-
Tablet (please complete the following information):
OS: [e.g. Android OS, Chrome OS, Windows11, iPad OS] Browser [e.g. Chrome, Safari, Edge, Firefox] Version [e.g. 16.5]
Expected behavior / 期待される挙動
- A clear and concise description of what you expected to happen.
Actual behavior / 実際の挙動
Screenshots
- If applicable, add screenshots to help explain your problem.
Other notes / その他
- Add any other context about the problem here.
- Will you try to create a pull request?
- yes / no
try-catchで囲まれてはいるので、middleにします。以下のどちらかをやりたいもの。
- 衝突したら自動でやり直す
- 「もう1回試してください」みたいなメッセージを出す。
idの重複しやすさにもよるかもしれませんが、個人的には自動的にリトライする方がいいようにと思います。 (実装が大変なようでしたら、メッセージを出してユーザに再度試行させるというのはいかがでしょうか?)
理由: ユーザの直接的な操作ミスではないようにと思われるため