feat(influxdb):add http error handler interface

pull/14213/head
Kelvin Wang 2019-06-26 19:21:42 -04:00
parent 611a7d83e5
commit 4a75004bd7
1 changed files with 7 additions and 0 deletions

View File

@ -1,9 +1,11 @@
package influxdb
import (
"context"
"encoding/json"
"errors"
"fmt"
"net/http"
"strings"
)
@ -262,3 +264,8 @@ func decodeInternalError(target interface{}) error {
}
return nil
}
// HTTPErrorHandler is the interface to handle http error.
type HTTPErrorHandler interface {
HandleHTTPError(ctx context.Context, err error, w http.ResponseWriter)
}