MCPcopy Index your code
hub / github.com/uber/aresdb / ReportError

Method ReportError

api/query_handler.go:327–339  ·  view source on GitHub ↗

ReportError writes the error of the query to the response.

(queryIndex int, table string, err error, statusCode int)

Source from the content-addressed store, hash-verified

325
326// ReportError writes the error of the query to the response.
327func (w *JSONQueryResponseWriter) ReportError(queryIndex int, table string, err error, statusCode int) {
328 // Usually larger status code means more severe problem.
329 if statusCode > w.statusCode {
330 w.statusCode = statusCode
331 }
332 if w.response.Errors == nil {
333 w.response.Errors = make([]error, len(w.response.Results))
334 }
335 w.response.Errors[queryIndex] = err
336 utils.GetRootReporter().GetChildCounter(map[string]string{
337 "table": table,
338 }, utils.QueryFailed).Inc(1)
339}
340
341// ReportQueryContext writes the query context to the response.
342func (w *JSONQueryResponseWriter) ReportQueryContext(qc *query.AQLQueryContext) {

Callers 1

ReportResultMethod · 0.95

Calls 2

GetRootReporterFunction · 0.92
GetChildCounterMethod · 0.80

Tested by

no test coverage detected