De-obfuscate error message
Previously, this error message would stringify as a pointer address, which isn't particularly helpful. This change breaks out the elements of the challenge object such that the error is appropriately represented. Signed-off-by: Ted Reed <ted.reed@gmail.com>
This commit is contained in:
parent
057284b593
commit
f01a70c8a6
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ func (ch challenge) SetHeaders(w http.ResponseWriter) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ch challenge) Error() string {
|
func (ch challenge) Error() string {
|
||||||
return fmt.Sprintf("basic authentication challenge: %#v", ch)
|
return fmt.Sprintf("basic authentication challenge for realm %q: %s", ch.realm, ch.err)
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
Loading…
Reference in a new issue