fit-together-tv / ft-issue-report

Issue report for fit-together-tv/chuongnau, etc
0 stars 0 forks source link

`Add new class` Status code 400 #16

Open nagthanm opened 3 years ago

nagthanm commented 3 years ago

Reproduction Steps

Actual behavior

Expect bahavior

Device:

Windows 10 Laptop

Browser:

Chrome, Edge

graphql copy response: {"errors":[{"message":"COMMON.SOMETHING_WENT_WRONG","extensions":{"code":"INTERNAL_SERVER_ERROR"}},{"message":"COMMON.SOMETHING_WENT_WRONG","extensions":{"code":"INTERNAL_SERVER_ERROR"}}]}

graphql copy cURL (cmd) curl 'https://tyb5m96rze.execute-api.ap-southeast-1.amazonaws.com/production/graphql' \ -H 'authority: tyb5m96rze.execute-api.ap-southeast-1.amazonaws.com' \ -H 'sec-ch-ua: "Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92"' \ -H 'accept: /' \ -H 'x-timezone: Asia/Saigon' \ -H 'authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjkwMDk1YmM2ZGM2ZDY3NzkxZDdkYTFlZWIxYTU1OWEzZDViMmM0ODYiLCJ0eXAiOiJKV1QifQ.eyJuYW1lIjoiVGhhbmcgRHVvbmcgSG9hbmciLCJwaWN0dXJlIjoiaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EvQUFUWEFKemd4bWs4UzhaQWM2MzMtcmRjXzZ4MjZkNTdPRWwwdmc5cUw1dk49czk2LWMiLCJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vY2h1b25nbmF1IiwiYXVkIjoiY2h1b25nbmF1IiwiYXV0aF90aW1lIjoxNjI5MjU1OTQyLCJ1c2VyX2lkIjoibEhKbmx2bmFUZU9SQlBoU0xBcElIaHpQdk56MSIsInN1YiI6ImxISm5sdm5hVGVPUkJQaFNMQXBJSGh6UHZOejEiLCJpYXQiOjE2MzAyOTkzMTksImV4cCI6MTYzMDMwMjkxOSwiZW1haWwiOiJ0aGFuZ2RnaGdAZ21haWwuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImZpcmViYXNlIjp7ImlkZW50aXRpZXMiOnsiZ29vZ2xlLmNvbSI6WyIxMDcxODU2OTkzMjI5NzQ3MDkwNDQiXSwiZW1haWwiOlsidGhhbmdkZ2hnQGdtYWlsLmNvbSJdfSwic2lnbl9pbl9wcm92aWRlciI6Imdvb2dsZS5jb20ifX0.iOLYLfvZCNhflKYvCB-T_gXOQZuJ4OGI270EdXeTGplh9XSXRW-aw6rUqr6XviR8Io1AI80RBMe9uBO8w8ir6XgObjLLGGYa_cCfjYolA5bOt2jubmkXpgnKlQGzGOpwNXA4i198WdURk_VMtaVkazVL0GMmYdU9qRCB6XPmE3CJtxbXNC04A5AfWPMq1VfDPZT5aIBGo84AS6D2w87XV25yqPOxpkaTNrNE3Mm2sRt4W46_wpTVOnRjSDPZWmzlSk4YGUeYUZ0oganpuQdek2Xmjqs0RNzZQI-OazUcI7YjlF_9_HGDY-Sv9UgXquGAqxlc0kjjLOMPfgIb6u50TQ' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36' \ -H 'content-type: application/json' \ -H 'origin: https://app.chuongnau.com' \ -H 'sec-fetch-site: cross-site' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-dest: empty' \ -H 'accept-language: vi,en-US;q=0.9,en;q=0.8,ja;q=0.7,fr;q=0.6' \ --data-raw $'{"operationName":"CreateOrUpdateClass","variables":{"args":{"name":"A1","studentInformation":[{"firstName":"A","lastName":"Nguyễn","email":"email1@example.com","phoneNumber":"+84123456789"},{"firstName":"B","lastName":"Phạm","email":"email2@example.com","phoneNumber":"+84123456789"},{"firstName":"C","lastName":"Lê","email":"email3@example.com","phoneNumber":"+84123456789"},{"firstName":"D","lastName":"Duong","email":"email@Duong","phoneNumber":333333333},{"firstName":"E","lastName":"Nam","email":"email@NAm","phoneNumber":1111111111111}]}},"query":"mutation CreateOrUpdateClass($args: CreateOrUpdateClass_Input\u0021) {\n result: createOrUpdateClass(args: $args) {\n class {\n ...ClassForUserProfile\n typename\n }\n typename\n }\n}\n\nfragment ClassForUserProfile on Class {\n enrolmentCount: countEnrolments\n id\n isNew\n name\n updatedAt\n __typename\n}\n"}' \ --compressed

bugless-it commented 3 years ago

@nagthanm could you send me the excel file you used to create class?

bugless-it commented 3 years ago

I managed to create a class successfully. I think the reason is 1111111111111 is not a valid phone number. A phone number should be in the form "+(countrycode)(phonenumber)".

nagthanm commented 3 years ago

Danh sach lop

Can you help me with this. I found this graphql in red and there's no status code

Copy response Unable to copy

Copy as cURL curl "https://tyb5m96rze.execute-api.ap-southeast-1.amazonaws.com/production/graphql" ^ -H "authority: tyb5m96rze.execute-api.ap-southeast-1.amazonaws.com" ^ -H "sec-ch-ua: ^\^"Chromium^\^";v=^\^"92^\^", ^\^" Not A;Brand^\^";v=^\^"99^\^", ^\^"Microsoft Edge^\^";v=^\^"92^\^"" ^ -H "accept: /" ^ -H "x-timezone: Asia/Saigon" ^ -H "authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjkwMDk1YmM2ZGM2ZDY3NzkxZDdkYTFlZWIxYTU1OWEzZDViMmM0ODYiLCJ0eXAiOiJKV1QifQ.eyJuYW1lIjoiVGhhbmcgRHVvbmcgSG9hbmciLCJwaWN0dXJlIjoiaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EvQUFUWEFKemd4bWs4UzhaQWM2MzMtcmRjXzZ4MjZkNTdPRWwwdmc5cUw1dk49czk2LWMiLCJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vY2h1b25nbmF1IiwiYXVkIjoiY2h1b25nbmF1IiwiYXV0aF90aW1lIjoxNjI4NzQyMzE5LCJ1c2VyX2lkIjoibEhKbmx2bmFUZU9SQlBoU0xBcElIaHpQdk56MSIsInN1YiI6ImxISm5sdm5hVGVPUkJQaFNMQXBJSGh6UHZOejEiLCJpYXQiOjE2MzA0MjM0NjUsImV4cCI6MTYzMDQyNzA2NSwiZW1haWwiOiJ0aGFuZ2RnaGdAZ21haWwuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImZpcmViYXNlIjp7ImlkZW50aXRpZXMiOnsiZ29vZ2xlLmNvbSI6WyIxMDcxODU2OTkzMjI5NzQ3MDkwNDQiXSwiZW1haWwiOlsidGhhbmdkZ2hnQGdtYWlsLmNvbSJdfSwic2lnbl9pbl9wcm92aWRlciI6Imdvb2dsZS5jb20ifX0.IfsqFg5VpND4RQzyMeS5yovFqVjietg7N7a0K64IPwTskka-hTBJl_BPVFkGVqSVsmaHvxr5povunW5i34OxsTqZgP-EbWMwoVtzCtQENluT1lkmftKgTqPEfuQyvRuRVsYoPtnsh04kZxd_TRybAj3B55qHES76u7tjXAR0gbVC1viz6MUTtaf9wqPAgXjM48J1xTP4rH0Euh0Xvilto9iKvccfr2pYez4n3Fn_zdk1tihsOJzIfzN8-GZtLqJGrSHXKzKjWu9yrgB_1j8SDV9DS_fI63djACgU5w7CtHPECgQ8PJcmZ1RcGt-RpD-_KWN27p75MjC9NpiNDZTH0A" ^ -H "sec-ch-ua-mobile: ?0" ^ -H "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36 Edg/92.0.902.84" ^ -H "content-type: application/json" ^ -H "origin: https://app.chuongnau.com" ^ -H "sec-fetch-site: cross-site" ^ -H "sec-fetch-mode: cors" ^ -H "sec-fetch-dest: empty" ^ -H "accept-language: en,en-US;q=0.9,vi;q=0.8" ^ --data-raw "^{^\^"operationName^\^":^\^"CreateOrUpdateClass^\^",^\^"variables^\^":^{^\^"args^\^":^{^\^"name^\^":^\^"Danh sach lop^\^",^\^"studentInformation^\^":^[^{^\^"firstName^\^":^\^"A^\^",^\^"lastName^\^":^\^"Nguy^ễn^\^",^\^"email^\^":^\^"email1^@example.com^\^",^\^"phoneNumber^\^":^\^"+84123456789^\^"^},^{^\^"firstName^\^":^\^"B^\^",^\^"lastName^\^":^\^"Ph^ạm^\^",^\^"email^\^":^\^"email2^@example.com^\^",^\^"phoneNumber^\^":^\^"+84123456789^\^"^},^{^\^"firstName^\^":^\^"C^\^",^\^"lastName^\^":^\^"L^ê^\^",^\^"email^\^":^\^"email3^@example.com^\^",^\^"phoneNumber^\^":^\^"+84123456789^\^"^},^{^\^"firstName^\^":^\^"D^\^",^\^"lastName^\^":^\^"Duong^\^",^\^"email^\^":^\^"emailDuong^@email.com^\^",^\^"phoneNumber^\^":^\^"+8498444433^\^"^},^{^\^"firstName^\^":^\^"E^\^",^\^"lastName^\^":^\^"Nam^\^",^\^"email^\^":^\^"emailNam^@email.com^\^",^\^"phoneNumber^\^":^\^"+8466666666^\^"^}^]^}^},^\^"query^\^":^\^"mutation CreateOrUpdateClass(^$args: CreateOrUpdateClass_Input^!) ^{^\^\n result: createOrUpdateClass(args: ^$args) ^{^\^\n class ^{^\^\n ...ClassForUserProfile^\^\n typename^\^\n ^}^\^\n typename^\^\n ^}^\^\n^}^\^\n^\^\nfragment ClassForUserProfile on Class ^{^\^\n enrolmentCount: countEnrolments^\^\n id^\^\n isNew^\^\n name^\^\n updatedAt^\^\n __typename^\^\n^}^\^\n^\^"^}" ^ --compressed

bugless-it commented 3 years ago

@nagthanm the problem is the phone numbers are the same. In the system, all phone numbers and emails have to be unique @nagthanm

nagthanm commented 3 years ago

Danh sach lop 2

Could you tell me more specific what is wrong with my phone number?

bugless-it commented 3 years ago

@nagthanm it looks the first 3 students have the same phone number? the system does not allow duplicate numbers.

nagthanm commented 3 years ago

image

I am unable to remove a participant from a class? Could you help me?

nagthanm commented 3 years ago

@nagthanm it looks the first 3 students have the same phone number? the system does not allow duplicate numbers.

Yes, i can upload the file now!