K
Kinde9mo ago
C

{ errors: [ { code: 'NAME_REQUIRED', message: 'Name is required' } ] }

Suddenly getting this error using the create org api I am sending a name in my body {"name":"IF","is_allow_registrations":true} const createOrgRes = await fetch(orgUrl, { method: 'POST', headers: kindeheaders, body: JSON.stringify({ "name": customer.customer_name, "is_allow_registrations": true }) }); console.log(JSON.stringify({ "name": customer.customer_name, "is_allow_registrations": true })); const createOrgData = await createOrgRes.json(); console.log(createOrgData); it worked few days ago, is anything changed?
11 Replies
Daniel_Kinde
Daniel_Kinde9mo ago
Hi, Let me check into this for you. I am not seeing any changes, can you confirm the payload you're sending?
C
COP9mo ago
{ method: 'POST', headers: { Accept: 'application/json', Authorization: 'Bearer REMOVED' }, body: '{"name":"Braedstrup IF","is_allow_registrations":true}' } { status: 'error', error_id: '880e52162b64472985d37a218239bab5' } i am listing org prior in my code withot problems, so my auth code is working
Daniel_Kinde
Daniel_Kinde9mo ago
Thansk for giving the payload, I will look into the error and come back to you
C
COP9mo ago
Or { method: 'POST', headers: { Accept: 'application/json', Authorization: 'Bearer REMOVED!!' }, body: '{"name":"Braedstrup IF","is_allow_registrations":true}' } Failed to fetch org code from Umami: Bad Request { errors: [ { code: 'NAME_REQUIRED', message: 'Name is required' } ] }
ryno1234.
ryno1234.9mo ago
I'm wondering if this is related to my issue I was having with importing organizations where it was telling me that the "name" column is required. @Daniel_Kinde, any update?
Daniel_Kinde
Daniel_Kinde9mo ago
Hi @ryno1234. I have been trying to find a way to reproduce your issue when supplying a name, I have been unable to. The only way I was able to get this issue is when name was empty. I am going to DM you a link, book a slot on my diary and we can jump on a call and look into it together?
C
COP9mo ago
Any news on this one, just tried again and still receive the Name required.. { method: 'POST', headers: { Accept: 'application/json', Authorization: 'Bearer REMOVED!' }, body: '{"name":"SabroIF","is_allow_registrations":true}' } { errors: [ { code: 'NAME_REQUIRED', message: 'Name is required' } ] }
Daniel_Kinde
Daniel_Kinde9mo ago
@C I have tried to reproduce this and not been able to, using your exact payload it works for me so keen to look at this with you closer. Can you give me reproduction steps or are you happy to jump on a call so I can look at the issue with you?
C
COP9mo ago
@Daniel_Kinde did you have the time to check the info i sent to you on DM?
Daniel_Kinde
Daniel_Kinde9mo ago
I am sorry I missed your DM, I will check to see what could be happening here. Hi @C I have found the issue, when you're making the request the you need to include 'Content-Type':'application/json', I added to your code and it worked ok. Let me know if this works for you.
C
COP9mo ago
nice find, do you know why it suddenly stopped working? and thanks
Want results from more Discord servers?
Add your server