err.go 486 B

123456789101112131415161718
  1. // Copyright 2020 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package externalaccount
  5. import "fmt"
  6. // Error for handling OAuth related error responses as stated in rfc6749#5.2.
  7. type Error struct {
  8. Code string
  9. URI string
  10. Description string
  11. }
  12. func (err *Error) Error() string {
  13. return fmt.Sprintf("got error code %s from %s: %s", err.Code, err.URI, err.Description)
  14. }