fix(http): fix template not found error
parent
36f2de831a
commit
dac4167875
|
@ -4,6 +4,9 @@ import (
|
|||
"context"
|
||||
)
|
||||
|
||||
// ErrDocumentNotFound is the error msg for a missing document.
|
||||
const ErrDocumentNotFound = "document not found"
|
||||
|
||||
// DocumentService is used to create/find instances of document stores.
|
||||
type DocumentService interface {
|
||||
CreateDocumentStore(ctx context.Context, name string) (DocumentStore, error)
|
||||
|
|
|
@ -581,6 +581,13 @@ func (s *DocumentStore) FindDocuments(ctx context.Context, opts ...influxdb.Docu
|
|||
return nil
|
||||
})
|
||||
|
||||
if IsNotFound(err) {
|
||||
return nil, &influxdb.Error{
|
||||
Code: influxdb.ENotFound,
|
||||
Msg: influxdb.ErrDocumentNotFound,
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue