From cb2b27f6ed3ac755765728a70dfb170687aa2d86 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Tue, 26 Nov 2024 19:50:26 +0200 Subject: [PATCH] updated otp request error message --- apis/record_auth_otp_request.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/record_auth_otp_request.go b/apis/record_auth_otp_request.go index edb1e714..29183d40 100644 --- a/apis/record_auth_otp_request.go +++ b/apis/record_auth_otp_request.go @@ -49,12 +49,12 @@ func recordRequestOTP(e *core.RequestEvent) error { return e.App.OnRecordRequestOTPRequest().Trigger(event, func(e *core.RecordCreateOTPRequestEvent) error { if e.Record == nil { - // write a dummy 200 response as a very rudimentary user emails enumeration protection + // write a dummy 200 response as a very rudimentary emails enumeration "protection" e.JSON(http.StatusOK, map[string]string{ "otpId": core.GenerateDefaultRandomId(), }) - return fmt.Errorf("failed to fetch %s record with email %s: %w", collection.Name, form.Email, err) + return fmt.Errorf("missing or invalid %s OTP auth record with email %s", collection.Name, form.Email) } var otp *core.OTP