forgejo/routers/api
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
..
actions Fix nil dereference on error (#30740) 2024-04-28 15:39:02 +02:00
forgejo/v1 Fix #2512 /api/forgejo/v1/version auth check (#2582) 2024-03-19 07:16:19 +00:00
packages Add support for npm bundleDependencies (#30751) 2024-05-05 08:24:01 +01:00
shared Fix #2512 /api/forgejo/v1/version auth check (#2582) 2024-03-19 07:16:19 +00:00
v1 Catch and handle unallowed file type errors in issue attachment API (#30791) 2024-05-05 12:15:40 +01:00