8000 Unable to create discussion with request body. · Issue #1323 · giscus/giscus · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Unable to create discussion with request body. #1323

New issue

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

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

Already on GitHub? Sign in to your account

Open
jaune162 opened this issue Feb 26, 2024 · 5 comments
Open

Unable to create discussion with request body. #1323

jaune162 opened this issue Feb 26, 2024 · 5 comments

Comments

@jaune162
Copy link

This config generate by https://giscus.app/

<script src="https://giscus.app/client.js"
        data-repo="jaune162/books.jaune162.blog"
        data-repo-id="R_kgDOLYN10Q"
        data-category="Announcements"
        data-category-id="DIC_kwDOLYN10c4Cdh8Q"
        data-mapping="pathname"
        data-strict="0"
        data-reactions-enabled="1"
        data-emit-metadata="0"
        data-input-position="bottom"
        data-theme="light"
        data-lang="zh-CN"
        crossorigin="anonymous"
        async>
</script>

This is the request payload of my websit.

{
          "repo":  "jaune162/books.jaune162.blog",
          "input":  {
                    "repositoryId":  "R_kgDOLYN10Q",
                    "categoryId":  "DIC_kwDOIHQZms4CR5Q8",
                    "title":  "docs/design-pattern/design-principle/",
                    "body":  "# docs/design-pattern/design-principle/\n\n- 单一职责原则(Single Responsibility Principle, SRP)\n\nhttps://books.jaune162.blog/docs/design-pattern/design-principle/"
          }
}

The config of repo and repoId is correct. But the response body is {error: "Unable to create discussion with request body."}.

@jaune162
Copy link
Author

@jaune162
Copy link
Author

When I change the Discussion Category to General(DIC_kwDOLYN10c4Cdh8R)。It's works.

category="General"
categoryId="DIC_kwDOLYN10c4Cdh8R"

It may not work properly when the Discussion Category is Announcements.

@YYGod0120
Copy link

I also encountered the same problem

@bmarwell
Copy link

I am not sure this is a bug, because the README file says:

Choose the discussion category where new discussions will be created. It is recommended to use a category with the Announcements type so that new discussions can only be created by maintainers and giscus.

@benvillalobos
Copy link

Can confirm something it up with the Announcements category. I see it generating new topics in the General category for every comment.

The fix for me:

  1. Set category to General
  2. Input your repo name at giscus.app, scroll down, copy the given categoryId into the categoryId field in your app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
2A37
0