Commit 003fe436 authored by Georg Hartmann's avatar Georg Hartmann

make error message more usefuly by revealing type

parent fe1fd85a
......@@ -19,12 +19,12 @@ package gitlab
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"net/url"
"reflect"
"strconv"
"strings"
......@@ -348,7 +348,7 @@ func parseID(id interface{}) (string, error) {
case string:
return v, nil
default:
return "", errors.New("the ID must be an int or a string")
return "", fmt.Errorf("the ID must be an int or a string but is %v", reflect.TypeOf(id))
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment