diff options
author | jloup <jean-loup.jamet@trainline.com> | 2018-06-25 22:56:45 +0200 |
---|---|---|
committer | jloup <jean-loup.jamet@trainline.com> | 2018-06-25 22:56:45 +0200 |
commit | 574bf1e47f1b611449faa8fa5848ba63dfc7d0e9 (patch) | |
tree | 179b4007d1520dd5030a77cb29a1b4b35c9eb17f | |
parent | 73bad1e9ec3c0981151ead328b8f955c70f07429 (diff) | |
download | Front-574bf1e47f1b611449faa8fa5848ba63dfc7d0e9.tar.gz Front-574bf1e47f1b611449faa8fa5848ba63dfc7d0e9.tar.zst Front-574bf1e47f1b611449faa8fa5848ba63dfc7d0e9.zip |
Do not return internal error when SMS send fails.v0.0.23
Just log it.
-rw-r--r-- | api/password_reset.go | 2 | ||||
-rw-r--r-- | api/user.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/api/password_reset.go b/api/password_reset.go index 0c55c02..0e411f9 100644 --- a/api/password_reset.go +++ b/api/password_reset.go | |||
@@ -38,7 +38,7 @@ func (q PasswordResetQuery) Run() (interface{}, *Error) { | |||
38 | if CONFIG.FreeSMSUser != "" { | 38 | if CONFIG.FreeSMSUser != "" { |
39 | err := SendSMS(CONFIG.FreeSMSUser, CONFIG.FreeSMSPass, fmt.Sprintf("'%v' request a password reset. Token '/change-password?token=%v'", q.In.Email, token)) | 39 | err := SendSMS(CONFIG.FreeSMSUser, CONFIG.FreeSMSPass, fmt.Sprintf("'%v' request a password reset. Token '/change-password?token=%v'", q.In.Email, token)) |
40 | if err != nil { | 40 | if err != nil { |
41 | return nil, NewInternalError(err) | 41 | log.Error(err) |
42 | } | 42 | } |
43 | } | 43 | } |
44 | 44 | ||
diff --git a/api/user.go b/api/user.go index b285a20..9fca34c 100644 --- a/api/user.go +++ b/api/user.go | |||
@@ -115,7 +115,7 @@ func (q SignupQuery) Run() (interface{}, *Error) { | |||
115 | if CONFIG.FreeSMSUser != "" { | 115 | if CONFIG.FreeSMSUser != "" { |
116 | err := SendSMS(CONFIG.FreeSMSUser, CONFIG.FreeSMSPass, fmt.Sprintf("New user signup '%v'", q.In.Email)) | 116 | err := SendSMS(CONFIG.FreeSMSUser, CONFIG.FreeSMSPass, fmt.Sprintf("New user signup '%v'", q.In.Email)) |
117 | if err != nil { | 117 | if err != nil { |
118 | return nil, NewInternalError(err) | 118 | log.Error(err) |
119 | } | 119 | } |
120 | } | 120 | } |
121 | 121 | ||