Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix: PUT groups/{groupId}/?Action=generateInvitationLink returns Error #293

Closed
taniguchiiqqq opened this issue Feb 13, 2024 · 3 comments · Fixed by #294
Closed

Fix: PUT groups/{groupId}/?Action=generateInvitationLink returns Error #293

taniguchiiqqq opened this issue Feb 13, 2024 · 3 comments · Fixed by #294
Assignees
Labels
bug Something isn't working internal Created by team members

Comments

@taniguchiiqqq
Copy link
Member

Bug Description

When you call PUT groups/{groupId}/?Action=generateInvitationLink, you got Iternal Server Error.
This is the error message in CloudWatch.

2024-02-13T18:50:13.251Z	48f6944a-5fb7-42dd-a269-487514feb460	ERROR	SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:4747:19)
    at successSteps (node:internal/deps/undici/undici:4718:27)
    at specConsumeBody (node:internal/deps/undici/undici:4724:9)
    at _Request.json (node:internal/deps/undici/undici:4614:18)
    at HonoRequest.cachedBody (/var/task/index.js:5962:40)
    at HonoRequest.json (/var/task/index.js:6021:17)
    at /var/task/index.js:10109:14
    at dispatch (/var/task/index.js:5851:23)
    at /var/task/index.js:5852:20

Expected Behavior

groups/{groupId}/?Action=generateInvitationLink, return invitationLink

@taniguchiiqqq taniguchiiqqq added bug Something isn't working internal Created by team members labels Feb 13, 2024
@taniguchiiqqq taniguchiiqqq self-assigned this Feb 13, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Nishiki Feb 13, 2024
@hitohata
Copy link
Member

It seems this error occurs in the router. Can you get the body of the request?
Or do you have any idea how to resolve this problem?

@taniguchiiqqq
Copy link
Member Author

@hitohata
Yes, I found c.req.json(), occurred the error because it doesn't have body data when the Action is generateInvitationLink. I'll fix it soon

@hitohata
Copy link
Member

OK. I've made sense. I didn't know if the body was not provided, this error would occur. I feel like I really learned something today. Thank you.

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Nishiki Feb 13, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working internal Created by team members
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants