forgejo/routers/api/v1
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
..
activitypub activitypub: warn instead of error 2024-03-24 07:12:31 +01:00
admin Fix empty field login_name in API response JSON when creating user (#30511) 2024-04-21 11:59:16 +02:00
misc Port "Fix wrong test usage of AppSubURL" 2024-03-06 21:47:44 +01:00
notify drop log.Error in ReadRepoNotifications 2024-03-24 07:12:31 +01:00
org feat(api): enhance Actions Secrets Management API for repository (#30656) 2024-04-28 15:39:01 +02:00
packages remove util.OptionalBool and related functions (#29513) 2024-03-06 12:10:46 +08:00
repo Catch and handle unallowed file type errors in issue attachment API (#30791) 2024-05-05 12:15:40 +01:00
settings Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
shared Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
swagger Add API endpoints for getting action jobs status (#26673) 2024-05-05 12:15:40 +01:00
user Add setting to disable user features when user login type is not plain (#29615) 2024-04-07 11:09:21 +02:00
utils Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
api.go Add API endpoints for getting action jobs status (#26673) 2024-05-05 12:15:40 +01:00