mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 04:05:42 +01:00
packages/maven: log.Warn on bad request
This commit is contained in:
parent
dda88488ca
commit
fb6bcf1029
1 changed files with 4 additions and 1 deletions
|
@ -49,7 +49,10 @@ var (
|
|||
func apiError(ctx *context.Context, status int, obj any) {
|
||||
helper.LogAndProcessError(ctx, status, obj, func(message string) {
|
||||
// The maven client does not present the error message to the user. Log it for users with access to server logs.
|
||||
if status == http.StatusBadRequest || status == http.StatusInternalServerError {
|
||||
switch status {
|
||||
case http.StatusBadRequest:
|
||||
log.Warn(message)
|
||||
case http.StatusInternalServerError:
|
||||
log.Error(message)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue