fix: clearer Club Log / FCC ULS upload-download diagnostics
Club Log: on a failed batch, log the callsign#id of every QSO in it so a per-record rejection (e.g. a field value nginx's WAF blocks with a 403) can actually be located instead of hiding behind "batch FAILED". FCC ULS: catch the maintenance bounce before following it. data.fcc.gov redirects to www.fcc.gov/system-maintenance during maintenance windows, and that page then HTTP/2-stream-errors — which surfaced as a cryptic INTERNAL_ERROR. Detect the redirect and return "try again later".
This commit is contained in:
@@ -7846,7 +7846,15 @@ func (a *App) runManualUpload(svc extsvc.Service, ids []int64, cfg extsvc.Extern
|
||||
if err != nil {
|
||||
msg = err.Error()
|
||||
}
|
||||
// Name the QSOs in the failing batch so a per-record rejection
|
||||
// (e.g. a field value nginx's WAF blocks with a 403) can actually
|
||||
// be located — otherwise "batch FAILED" hides which contact it is.
|
||||
who := make([]string, 0, len(batch))
|
||||
for _, it := range batch {
|
||||
who = append(who, fmt.Sprintf("%s#%d", it.call, it.id))
|
||||
}
|
||||
emit(fmt.Sprintf("Club Log: batch of %d FAILED: %s", len(batch), msg))
|
||||
applog.Printf("extsvc: Club Log batch FAILED (%s) — QSOs: %s", msg, strings.Join(who, ", "))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user