mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-23 11:29:46 +00:00
dashboard/app: don't log user errors in checkCrashTextAccess too
This pollutes error logs too.
This commit is contained in:
parent
e1b158574e
commit
ffff482138
@ -108,8 +108,11 @@ func checkCrashTextAccess(c context.Context, r *http.Request, field string, id i
|
||||
return nil, fmt.Errorf("failed to query crashes: %v", err)
|
||||
}
|
||||
if len(crashes) != 1 {
|
||||
return nil, fmt.Errorf("checkCrashTextAccess: found %v crashes for %v=%v",
|
||||
len(crashes), field, id)
|
||||
err := fmt.Errorf("checkCrashTextAccess: found %v crashes for %v=%v", len(crashes), field, id)
|
||||
if len(crashes) == 0 {
|
||||
err = ErrDontLog{err}
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
crash := crashes[0]
|
||||
bug := new(Bug)
|
||||
@ -128,13 +131,13 @@ func checkJobTextAccess(c context.Context, r *http.Request, field string, id int
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to query jobs: %v", err)
|
||||
}
|
||||
if len(keys) != 1 {
|
||||
err := fmt.Errorf("checkJobTextAccess: found %v jobs for %v=%v", len(keys), field, id)
|
||||
if len(keys) == 0 {
|
||||
// This can be triggered by bad user requests, so don't log the error.
|
||||
return ErrDontLog{fmt.Errorf("checkJobTextAccess: found no jobs for %v=%v", field, id)}
|
||||
err = ErrDontLog{err}
|
||||
}
|
||||
if len(keys) > 1 {
|
||||
return fmt.Errorf("checkJobTextAccess: found %v jobs for %v=%v",
|
||||
len(keys), field, id)
|
||||
return err
|
||||
}
|
||||
bug := new(Bug)
|
||||
if err := db.Get(c, keys[0].Parent(), bug); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user