forgejo/routers
Kemal Zebari 9cd0441cd3
Catch and handle unallowed file type errors in issue attachment API (#30791)
Before, we would just throw 500 if a user passes an attachment that is
not an allowed type. This commit catches this error and throws a 422
instead since this should be considered a validation error.

(cherry picked from commit 872caa17c0a30d95f85ab75c068d606e07bd10b3)

Conflicts:
	tests/integration/api_comment_attachment_test.go
	tests/integration/api_issue_attachment_test.go
	trivial context conflict because of 'allow setting the update date on issues and comments'
2024-05-05 12:15:40 +01:00
..
api Catch and handle unallowed file type errors in issue attachment API (#30791) 2024-05-05 12:15:40 +01:00
common feat(api): implement branch/commit comparison API (#30349) 2024-04-21 11:58:18 +02:00
install s/Gitea/Forgejo in various log messages and comments 2024-04-21 21:26:15 +05:00
private Fix tautological conditions (#30735) 2024-05-05 08:59:40 +01:00
utils [PORT] drop utils.IsExternalURL (and expand IsRiskyRedirectURL tests) (#3167) 2024-04-15 13:03:08 +00:00
web Resolve lint for unused parameter and unnecessary type arguments (#30750) 2024-05-05 08:38:16 +01:00
init.go s/Gitea/Forgejo in various log messages and comments 2024-04-21 21:26:15 +05:00