Rank 1: Thread
My other api's like getting documents and adding are working fine, but this one gives 400 bad gateway error. Am i missing something?
I have tried clearing browser cookies but no change
Votes
0
Replies
20
Participants
Unknown
Messages
21
Rank 1: Thread
My other api's like getting documents and adding are working fine, but this one gives 400 bad gateway error. Am i missing something?
I have tried clearing browser cookies but no change
You code looks intact
What are the details of the error you're getting?
Also just to be sure you're trying to login or to create the user?
Because if it's to create then you need to use the create method
Rank 1: Thread
browser-ponyfill.js:518 POST http://localhost/v1/account/sessions/email 400 (Bad Request)
(anonymous) @ browser-ponyfill.js:518
fetch @ browser-ponyfill.js:455
(anonymous) @ client.ts:408
(anonymous) @ tslib.es6.js:76
__awaiter @ tslib.es6.js:72
call @ client.ts:361
(anonymous) @ account.ts:524
(anonymous) @ tslib.es6.js:76
__awaiter @ tslib.es6.js:72
createEmailSession @ account.ts:503
createSession @ api.js:30
handleSubmit @ Login.jsx:30
callCallback @ react-dom.development.js:4157
invokeGuardedCallbackDev @ react-dom.development.js:4206
invokeGuardedCallback @ react-dom.development.js:4270
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4284
executeDispatch @ react-dom.development.js:9011
processDispatchQueueItemsInOrder @ react-dom.development.js:9043
processDispatchQueue @ react-dom.development.js:9056
dispatchEventsForPlugins @ react-dom.development.js:9067
(anonymous) @ react-dom.development.js:9258
batchedUpdates$1 @ react-dom.development.js:25979
batchedUpdates @ react-dom.development.js:3984
dispatchEventForPluginEventSystem @ react-dom.development.js:9257
dispatchEvent @ react-dom.development.js:6435
dispatchDiscreteEvent @ react-dom.development.js:6410
Rank 1: Thread
Iam tring to login user
Sorry, I meant in the network tab
What are you getting from the server?
Rank 1: Thread
Sorry iam new to development, This is the error message in google console. There is no other error as far as i know
Like here if you have any
Sure thing, Go to the network tab
Then click on the request you are sending
Then go to preview and take a screenshot
Rank 1: Thread
Good
Now run the login request again
and you will have it added to the list
When it's added click on it
Then click on preview
Take screen shot of that
Like this
Rank 1: Thread
OK So it doesn't return any data then
Let me think for a minute
OK,
I got it
I think
Error 400 means that one of the data you've enter are invalid
And it seems like the password field should be at least 8 characters
So try with 8+ characters and let me know
Rank 1: Thread
Oh completely forgot about it
Rank 1: Thread
It worked
Great
Rank 1: Thread
Thank you for being paitent with me
👍