2020-10-29 14:22:53 -04:00
|
|
|
// Copyright 2020 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2020-10-06 04:05:26 -04:00
|
|
|
package externalaccount
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
2020-10-27 14:58:39 -04:00
|
|
|
// Error for handling OAuth related error responses as stated in rfc6749#5.2.
|
2020-10-06 04:05:26 -04:00
|
|
|
type Error struct {
|
|
|
|
Code string
|
|
|
|
URI string
|
|
|
|
Description string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (err *Error) Error() string {
|
|
|
|
return fmt.Sprintf("got error code %s from %s: %s", err.Code, err.URI, err.Description)
|
2020-10-06 04:18:45 -04:00
|
|
|
}
|