17 lines
335 B
Go
17 lines
335 B
Go
// Copyright (c) Mainflux
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package sdk_test
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
|
|
"github.com/mainflux/mainflux/pkg/errors"
|
|
)
|
|
|
|
func createError(e error, statusCode int) error {
|
|
httpStatus := fmt.Sprintf("%d %s", statusCode, http.StatusText(statusCode))
|
|
return errors.Wrap(e, errors.New(httpStatus))
|
|
}
|