Skip to content

Commit

Permalink
fix: improve invalid channel error message returned (#1908)
Browse files Browse the repository at this point in the history
## What kind of change does this PR introduce?
* Improve error message around invalid channel error for phone auth.
Only twilio and twilio verify support whatsapp as a valid channel.

---------

Co-authored-by: Stojan Dimitrovski <[email protected]>
  • Loading branch information
kangmingtay and hf authored Jan 15, 2025
1 parent 586df26 commit f72f0ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (
UserExistsError error = errors.New("user already exists")
)

const InvalidChannelError = "Invalid channel, supported values are 'sms' or 'whatsapp'"
const InvalidChannelError = "Invalid channel, supported values are 'sms' or 'whatsapp'. 'whatsapp' is only supported if Twilio or Twilio Verify is used as the provider."

var oauthErrorMap = map[int]string{
http.StatusBadRequest: "invalid_request",
Expand Down

0 comments on commit f72f0ee

Please sign in to comment.