adrianhajdin / project_nextjs13_flexibble

https://jsmastery.pro
655 stars 141 forks source link

Update actions.ts #24

Open piglitch opened 1 year ago

piglitch commented 1 year ago

If you're experiencing this error:

Error: GraphQL Error (Code: 200): {"response":{"error":"{"data":null,"errors":[{"message":"Unauthorized"}]}","status":200,"headers":{"map":{"content-length":"51","content-type":"text/xml"}}},"request":{"query":"\n\tmutation CreateProject($input: ProjectCreateInput!) {\n\t\tprojectCreate(input: $input) {\n\t\t\tproject {\n\t\t\t\tid\n\t\t\t\ttitle\n\t\t\t\tdescription\n\t\t\t\tcreatedBy {\n\t\t\t\t\temail\n\t\t\t\t\tname\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n","variables":{"input":{"title":"jdgj","description":"djGDJ","image":"http://res.cloudinary.com/djzh0decn/image/upload/v1689633257/nxmwx4ikbcbly9cmglft.png","category":"","createdBy":{"link":"user_01H4KEB5YXHB02M6M6EC9N08Y1"}}}}} at makeRequest (webpack-internal:///(:3000/app-client)/./node_modules/graphql-request/build/esm/index.js:301:15) at async makeGraphQLRequest (webpack-internal:///(:3000/app-client)/./lib/actions.ts:43:16) at async handleFormSubmit (webpack-internal:///(:3000/app-client)/./components/ProjectForm.tsx:35:17)

The updated code solves it.

vercel[bot] commented 1 year ago

@piglitch is attempting to deploy a commit to the JS Mastery PRO Team on Vercel.

A member of the Team first needs to authorize it.