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

患者作成時、存在しない電話番号などで、SMS送信に失敗した場合でも登録自体はできてしまう #157

Open
halsk opened this issue Sep 14, 2021 · 1 comment

Comments

@halsk
Copy link
Member

halsk commented Sep 14, 2021

患者作成時にSMS送信に失敗した場合、本来Patientは作成されないべきだが、実際には登録できてしまう。

if (res.status !== "100") {
console.log("SMS Failed");
return {
statusCode: 400,
body: JSON.stringify({
errorCode: "RPM00104",
errorMessage: "User was created but sending SMS failed",
}),
};
}

でエラーコードを一応返している。(実際には #156 と相まってCORSエラーになるが)

SMSで送るログインURLを作るには一度レコードを作らないと行けないので上記のようになっているが、本来であれば、エラーになった時点で作成したレコードを削除すべきである。

@kenichisak
Copy link
Contributor

SMS を送信しない場合は、不正な電話番号であっても 検知・削除できないので このタイミングで Patient のレコードは削除しなくてもいいのではと個人的に思いました。

患者を削除する機能もあったと思いますし、別の機能として、電話番号を変更したり SMS を再送する機能がもしあれば問題ない気がします。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants