aboutsummaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
Diffstat (limited to 'errors.go')
-rw-r--r--errors.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/errors.go b/errors.go
index 6351ab4..29dcfee 100644
--- a/errors.go
+++ b/errors.go
@@ -46,6 +46,17 @@ func errInternal(err error) error {
return res
}
+func errInvalidParameter(key, value string) error {
+ res := &libhttp.EndpointResponse{
+ E: liberrors.E{
+ Code: http.StatusBadRequest,
+ Message: fmt.Sprintf("invalid or emtpy parameter %q: %q", key, value),
+ Name: "ERR_INVALID_PARAMETER",
+ },
+ }
+ return res
+}
+
func errInvalidTarget(id string) error {
res := &libhttp.EndpointResponse{
E: liberrors.E{