Gitea: [Bug Report] Reactions API throws 500 for duplicate reaction

Created on 30 Dec 2019  路  2Comments  路  Source: go-gitea/gitea

Description

If we post a same reaction more than one time via reaction API, it will throw 500.

https://gitea.com/api/swagger#/issue/issuePostCommentReaction

POST /repos/{owner}/{repo}/issues/comments/{id}/reactions

FYI, GitHub returns 201 for created, and returns 200 for duplicated

cc @6543

Screenshots

First Time (OK)

image

Second Time (ERROR)

image

image

Most helpful comment

Yes, a 5xx code means things do not work as expected.

BTW, I think the error details should not be exposed

All 2 comments

The Api works as intended (500 is xorm error ...)

I could change this ...

Yes, a 5xx code means things do not work as expected.

BTW, I think the error details should not be exposed

Was this page helpful?
0 / 5 - 0 ratings