Browse Source

Add HTTP status to HTTPerror message

master
harture 6 years ago
committed by GitHub
parent
commit
38db192a57
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      keycloak_client.go

3
keycloak_client.go

@ -2,6 +2,7 @@ package keycloak
import ( import (
"encoding/json" "encoding/json"
"strconv"
"fmt" "fmt"
"net/http" "net/http"
@ -41,7 +42,7 @@ type HTTPError struct {
} }
func (e HTTPError) Error() string { func (e HTTPError) Error() string {
return e.Message return strconv.Itoa(e.HTTPStatus) + ":" + e.Message
} }
// New returns a keycloak client. // New returns a keycloak client.

Loading…
Cancel
Save