T
Get 422 blank field
Thérence Brune almost 4 years ago 3582 views 4 replies
I get a 422 response with all the users fields said to be blank. But as you can see the sent payload is filled.
In the logs I get this:
```
Route: /public/v2/users
body: {name
:MyTest
,email
:email@gfds.net
,gender
:male
,status
:inactive
}
Error message: [{field
:email
,message
:can't be blank
},{field
:name
,message
:can't be blank
},{field
:gender
,message
:can't be blank, can be male or female
},{field
:status
,message
:can't be blank
}]
Method: POST
Error status : 422
```
I did the same call using the rest console and it worked
4 replies
T
Thérence Brune almost 4 years ago
Problem solve, I forgot the header content-type
: application/json
V
vrushabh patil over 3 years ago
where are all intelligent please provide use solution
Z
zeevy over 3 years ago
In above case header contenet-type
is missing
K
Kiran Kumar over 2 years ago
[
{
field
: email
,
message
: is invalid
}
]