You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it always fails with errs.FieldErrors of map[user.email:[{Code:[blank]user.email Data:map[] Message:You must specify either the [user.email] or [user.username] property. If you are emailing the user you must specify the [user.email].}] user.password:[{Code:[blank]user.password Data:map[] Message:You must specify the [user.password] property.}] user.username:[{Code:[blank]user.username Data:map[] Message:You must specify either the [user.email] or [user.username] property. If you are emailing the user you must specify the [user.email].}] userId:[{Code:[duplicate]userId Data:map[] Message:A User with Id [2bc3b58e-762a-40f8-b4cf-6dcc99ec09c8] already exists.}]]
which basically means that it simultaneously complains about user.email/user.password/user.username being empty and userId already existing (not a surprise, I didn't intend to create a new user).
however, when I do:
it works without issues, because User field was not included.
please consider making fusionauth.RegistrationRequestUser field a pointer type so that omitempty works, as it is ineffective for structs, and the existence of omitempty here means that it was intended to be omittable.
The text was updated successfully, but these errors were encountered:
Thanks. I think we have a pull request open here: #61 which does a similar thing. It's been open for a while :( but we haven't had a chance to fully test the change, so haven't incorporated it.
hello.
when i use
RegisterWithContext
func for the purpose of https://fusionauth.io/docs/v1/tech/apis/registrations#create-a-user-registration-for-an-existing-user such asit always fails with
errs.FieldErrors
ofmap[user.email:[{Code:[blank]user.email Data:map[] Message:You must specify either the [user.email] or [user.username] property. If you are emailing the user you must specify the [user.email].}] user.password:[{Code:[blank]user.password Data:map[] Message:You must specify the [user.password] property.}] user.username:[{Code:[blank]user.username Data:map[] Message:You must specify either the [user.email] or [user.username] property. If you are emailing the user you must specify the [user.email].}] userId:[{Code:[duplicate]userId Data:map[] Message:A User with Id [2bc3b58e-762a-40f8-b4cf-6dcc99ec09c8] already exists.}]]
which basically means that it simultaneously complains about user.email/user.password/user.username being empty and userId already existing (not a surprise, I didn't intend to create a new user).
however, when I do:
it works without issues, because User field was not included.
please consider making
fusionauth.RegistrationRequest
User
field a pointer type so thatomitempty
works, as it is ineffective for structs, and the existence ofomitempty
here means that it was intended to be omittable.The text was updated successfully, but these errors were encountered: