feat(influxdb):add http error handler interface
parent
611a7d83e5
commit
4a75004bd7
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue