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 ...@@ -19,12 +19,12 @@ package gitlab
import ( import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"errors"
"fmt" "fmt"
"io" "io"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"reflect"
"strconv" "strconv"
"strings" "strings"
...@@ -348,7 +348,7 @@ func parseID(id interface{}) (string, error) { ...@@ -348,7 +348,7 @@ func parseID(id interface{}) (string, error) {
case string: case string:
return v, nil return v, nil
default: 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